Fluent nHibernate:通用基类
有人知道与 Fluent nHibernate 一起使用的通用类吗 实现 INotifyPropertyChanged、Equals、==、!=
我想做:
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;
}
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; OnPropertyChanged(System.Reflection.MethodBase.GetCurrentMethod().Name.Substring(4)); /*OnPropertyChanged("Value");*/ }
} private double _Value;
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不知道任何现有的基类,但有另一种方法可以得到你想要的。请参阅
http://ayende.com/blog/4106/nhibernate-inotifypropertychanged
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