How do I make my Linq to Sql entity implement INot

2020-04-17 02:18发布

I've manually created some classes in the Linq-to-sql designer and when looking in the xx.designer.cs file the class doesn't implement INotifyPropertyChanged interface.

This works if I create the entity by dragging from the server explorer.

Does anyone know why this is and if I am doing something wrong or if there is somewhere to set this up in the designer.

Cheers.

1条回答
等我变得足够好
2楼-- · 2020-04-17 03:03

It looks like it doesn't do this unless you mark a member as a primary key. Then it does this. Presumably change tracking is useless without a primary key...

查看更多
登录 后发表回答