标签: .net castle-activerecord
是否有内置方法在Castle ActiveRecord中执行“插入或更新”?
有些事情:
try { ActiveRecordMediator<TEntity>.Create(e); } catch (Exception) { ActiveRecordMediator<TEntity>.Update(e); }
答案 0 :(得分:4)
ActiveRecordMediator<Foo>.Save(foo);