简体   繁体   English

EntityFramework的paper_trail等效项

[英]paper_trail equivalent for EntityFramework

Hi, do you know the gem 'airblade/paper_trail' equivalent that you can use with EntityFramework in .NET? 嗨,您知道可与.NET中的EntityFramework一起使用的gem'airblade / paper_trail'等效语言吗? I most care about version control for each record in the database. 我最关心数据库中每个记录的版本控制。

Personally I create logging tables that match in structure to the entity tables that I want to track and I add a couple of columns like "Action, ModifiedOn, ModifiedBy". 我个人创建的日志记录表在结构上与要跟踪的实体表相匹配,并添加了两列,例如“ Action,ModifiedOn,ModifiedBy”。 Next I add a trigger to the entity's table to insert a new record into my logging table with all the data from the record as well as my additional audit data. 接下来,我向实体表添加触发器,以将新记录与该记录中的所有数据以及其他审计数据一起插入到我的日志记录表中。

If however you'd prefer to use a 3rd party library I found EF Audit after a quick google search and it may work for you. 但是,如果您希望使用第三方库,则在快速Google搜索后我发现了EF Audit ,它可能对您有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM