Reputation: 29729
Im using EntityFramework and one of my objects (toList) as datasource for lookupedit.
Everything works fine but I would like to know if I can add an extra column to that control ? WHich isnt as a field in my object.
Thanks for help, bye
Upvotes: 0
Views: 333
Reputation: 1113
Yes you can. The classes generated by the EntityFramework are partial classes, so simply add the new bits you want on in a seperate partial class definition
public partial class ExistingEntityObject : EntityObject
{
public String NewProperty { get; set; }
}
These will appear like any other existing property. Obviously these newly added property will not affect the state of the underlying entity object unless you specifically wire them up to do so.
Upvotes: 2