开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜