用于 WPF 绑定的具有 INotifyPropertyChanged 和 IDataErrorInfo 的 LINQ to SQL 类
我使用 LINQ to SQL 类来访问我的数据库。现在我想使用 LINQ to SQL 类进行 WPF 数据绑定和验证。如何将这两个接口实现到我的项目模型中?是否可以自动实现 INotifyProperty?
I use the LINQ to SQL Classes to access to my database. Now I want to use the LINQ to SQL Classes for WPF DataBindings and validation. How do I implement these two interfaces to my projects Model? Is it possible implement INotifyProperty automatically?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这将为您提供 INotifyPropertyChanged 部分。
NotifyPropertyWeaver
那么 IDataErrorInfo 可以在基类中完成。
This gets you the INotifyPropertyChanged part.
NotifyPropertyWeaver
Then IDataErrorInfo can be done in a base class.