开发者

Insert or Update in Castle ActiveRecord

开发者 https://www.devze.com 2022-12-16 09:26 出处:网络
Is there a built-in way to do an \"insert-or-update\"开发者_Go百科 in Castle ActiveRecord? Something along the lines of:

Is there a built-in way to do an "insert-or-update"开发者_Go百科 in Castle ActiveRecord?

Something along the lines of:

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


ActiveRecordMediator<Foo>.Save(foo);
0

精彩评论

暂无评论...
验证码 换一张
取 消