在Castle ActiveRecord中插入或更新

时间:2010-01-16 11:10:59

标签: .net castle-activerecord

是否有内置方法在Castle ActiveRecord中执行“插入或更新”?

有些事情:

try
{
  ActiveRecordMediator<TEntity>.Create(e);
}
catch (Exception)
{
  ActiveRecordMediator<TEntity>.Update(e);
}

1 个答案:

答案 0 :(得分:4)

ActiveRecordMediator<Foo>.Save(foo);