开发者

Insert or Update in Castle ActiveRecord

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜