I am creating an Entity Framework 4 application, and I need a non-displayed property in one of my entities - my code will manage this property. What is the best way to create a property?
I assume that I will create a property in a partial class for the entity using this code:
private byte[] _Foo;
public byte[] Foo
{
get
{
return _Foo;
}
set
{
if (value == _Foo) return;
ReportPropertyChanging("Foo");
_Foo = value;
ReportPropertyChanged("Foo");
}
}
Is there a better way to create a property? Do I need to add anything else to Setter? Thank you for your help.
source
share