问题描述
|
有人知道与Fluent nHibernate一起使用的泛型类吗
实现INotifyPropertyChanged,等于,==,!=
我想要做 :
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; OnPropertyChanged(System.Reflection.MethodBase.GetCurrentMethod().Name.Substring(4)); /*OnPropertyChanged(\"Value\");*/ }
} private double _Value;
}
解决方法
我不知道任何现有的基类,但是有一种替代的方法来获取您想要的。看到
http://ayende.com/blog/4106/nhibernate-inotifypropertychanged