我想在OrmLite中为数据库插入或更新创建一个钩子.
假设我想CreateDate为每个插入数据库的记录写一个a,LastUpdateDate为没有数据库触发器的每个更新写一个或类似的东西.我看不出这样做,如果我打电话的方式Db.Save<Anything>(anyList)与anyList包含新增和更改的对象.
CreateDate
LastUpdateDate
Db.Save<Anything>(anyList)
anyList
我知道NHibernate确实提供了拦截器,以便在每个对象被持久化之前为其注入自定义逻辑.有没有办法在ServiceStack.OrmLite中实现这一点?
c# servicestack ormlite-servicestack
c# ×1
ormlite-servicestack ×1
servicestack ×1