EF4 - Is it possible to add a property to an entity which won't be reflected in the db?
In the epic quest of me getting my Create and Edit methods working for my complex model, I've come up with an idea - adding a bool开发者_如何转开发ean IsSelected property to one of my entity classes for use with checkboxes in my views. Is it possible? Would something as simple as
public partial class Platform : SomeBaseClass
{
public bool IsSelected { get; set; }
}
Do the trick?
Yes, it works. Have you tried it?
That said, I recommend dedicated view models.
精彩评论