Fluent nHibernate: Generic base class
Does somebody knows a Generic class for use with Fluent nHibernate that implements INotifyPropertyChanged, Equals, ==, !=
I would like to do :
public class MyEntity : EntityBase<MyEntity>
{
public virtual string Name
{
get { return _Name; }
set { _Name = value; OnPropertyChanged(System.Reflection.MethodBase.GetCurrentMethod().Name.Substring(4)); /*OnPropertyChanged("Name");*/ }
} private string _Name;
public virtual double Value
{
get { return _Value; }
set { _Value = value; O开发者_如何转开发nPropertyChanged(System.Reflection.MethodBase.GetCurrentMethod().Name.Substring(4)); /*OnPropertyChanged("Value");*/ }
} private double _Value;
}
i dont know any existing base class, but there is an alternative way to get what you want. See
http://ayende.com/blog/4106/nhibernate-inotifypropertychanged
精彩评论