TrackableEntities / trackable-entities

N-Tier Support for Entity Framework with WCF or ASP.NET Web API
http://trackableentities.github.io
MIT License
120 stars 36 forks source link

Update singel entitiy using shared Trackable Entities with EDMX #227

Closed LeonBar closed 5 years ago

LeonBar commented 5 years ago

Hi, First, thank you for your great work, In my project, I want to use shared entities and database first approach (EDMX)

when I trying to init ChangeTrackingCollection with the DB object that created by the ADO.NET it throws an exception because it didn't implement INotifyPropertyChanged (it's implemented ITrackable)

the problem is that I can't update the entities (when it's come from the client after the change on the server it's in unchanged state) and it's didn't update the db ..

what can i do to fix that, thanks

tonysneed commented 5 years ago

Thanks for your question. Can you please share some of your code?

LeonBar commented 5 years ago

Thank you for the quick reply, i found where I was wrong

For making them trackable in the designer i changed to Add code generation item > Trackable > Service Trackable Entities EF 6.x Model Generator

that not implemented the INotifyChanged

after I changed it to Client Trackable Entities EF 6.x Model Generator it's working fine.

thanks

tonysneed commented 5 years ago

Ah yes, that would explain the issue. Glad you figure it out!