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);
精彩评论