We are evaluating the ORM, at first - great job! - it'a amazing and it's easy to use and runs very good, but we have a little problem.
The problem is with and Entity with another one nested, if we try to bind the parent, its impossible to obtain datamember inside child.
ArticleEntity Art = new ArticleEntity(1);
BindingSource Formbinding = new BindingSource();
Formbinding.DataSource = Art;
//Lazy Load its ok
FamilyEntity Fam = Art.Family;
textBox1.DataBindings.Add("Text", Formbinding, "Codi", true, DataSourceUpdateMode.OnValidation);
textBox2.DataBindings.Add("Text", Formbinding, "Descripcio", true, DataSourceUpdateMode.OnValidation);
textBox3.DataBindings.Add("Text", Formbinding, "Family.Nom", true, DataSourceUpdateMode.OnValidation);
At runtime, when we try to bind string inside Art.Family.Nom, the program stop with error:
textBox3.DataBindings.Add("Text", Formbinding, "Family.Nom", true, DataSourceUpdateMode.OnValidation)
"Datamember Family not found in Datasource"
We check this thread, but no solution:
Please someone can help!!
I can reproduce it. It's however a winforms databinding issue, but I'll see if I have an answer for you.
I can't reproduce it if I move the bindings to the OnLoad override on the form:
public partial class Form1 : Form
protected override void OnLoad(EventArgs e)
_orderIdTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this._binding, "OrderId", true));
_customerCompanyNameTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this._binding, "Customer.CompanyName", true));
private void _fetchButton_Click(object sender, EventArgs e)
var o = new OrderEntity(10262);
_binding.DataSource = o;
Selfservicing, northwind (sqlserver, but doesn't matter), Browsable($false) attribute removed on the navigator.
The datasource is defined in the project on the 'datasources' pane in visual studio.
btw, we recommend to use Adapter over selfservicing. You do lose lazy loading, but adapter offers more features, like batching. Not sure you need those of course, but just in case
At first thanks for response, at this moment we solve it using related fields mapping.
When you said "Browsable($false)" where is the place to check if this option is enable/disable?
We are testing if use self or adapter at this moment
We find it!! and check if i removed Browsable($false) all runs ok without related fields