win7user10 / Laraue.EfCoreTriggers

Library to write triggers in C# with EF.Core
MIT License
112 stars 20 forks source link

Support to abstract entity #80

Open HHaoWang opened 1 year ago

HHaoWang commented 1 year ago

Hi I am a newer to this. I am using another EF Core trigger extension and I was attracted to this extension. When I want to migrate to this, a subtle but hard problem come to me. My database has many tables, and all these tables has three common columns including id, createTime and updateTime. Thus I use a BaseEntity abstract class, which involves the three columns, as all tables parent class. I hope to create some triggers to solve all tables' update operations. When a row is updated, the column updateTime is updated by the operation time, whatever entitis the row is. It's easy to complete it when I use another extension. However that extension is a "runtime" trigger extension and I want to make it be real triggers in the database . Unfortunately, it seems not easy to reach the same function with this extension. I found #50 maybe helpful. But after trying it, I can not do the update operations. I am using postgresql and EF Core 7. I really want to know how to make this function.