NickStrupat / EntityFramework.Triggers

Adds events for entity inserting, inserted, updating, updated, deleting, and deleted
MIT License
373 stars 46 forks source link

Properties not getting updated #39

Closed chetankhargone closed 5 years ago

chetankhargone commented 5 years ago

When I am inserting new entity, the Trackable propeteries Inserted & Updated is not getting the right value.

Please refer the app src at the below repository. https://github.com/chetankhargone/Triggers-in-EF-COre.git

Can you please check & suggest ?

Thanking You. Db

NickStrupat commented 5 years ago

Hi @chetankhargone

It looks like you are defining your own DbContextWithTriggers class, and also you aren't inheriting from it.

What you want to do is inherit your SampleAppContext from the DbContextWithTriggers class included in this library (so, delete your DbContextWithTriggers class). Like this...


class SampleAppContext : EntityFramework.Triggers.DbContextWithTriggers {

}