XAF Look up property displays correctly in listview but is null in detailview

entity-framework-6 nuget xaf

Question

I have the following business classes ( simplified )

public class Customer {

  Customer()
  {
  }
  public int Id {get;set;}
  public string Name {get;set;}
  public virtual Category {get;set;}
}

Public Class Category {
  public int Id {get;set;}
  public string Name {get;set;}
}

If I paste them into a new XAF EF Winforms demo project they work correctly.

However in my development project the Category displays correctly in the listview but is null in the detail view.

Why?

[Nuget?] The development project is using Nuget to install XAF. I am currently working on making the demo project use Nuget to see if that causes the issue.

I don't think so, the demo project is still good after making it use Nuget.

[Presence of smallint in the database?] This field is present in the table but not the model... investigating.

[LazyLoading?] That would explain it but I can't see any setting turning this on

1
0
3/2/2019 7:15:46 AM

Popular Answer

A public constructor is required https://www.devexpress.com/Support/Center/Question/Details/Q207865/unable-to-add-new-record-to-detail-view

public class Customer {

  public Customer()
  {
  }
  // etc
}
0
3/2/2019 7:16:23 AM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow