62,046
社区成员
发帖
与我相关
我的任务
分享
public static bool UpdateBlock(BlockInfo model)
{
NHibernate.ITransaction tr = DataProvider.Session.BeginTransaction();
try
{
DataProvider.Session.Update(model);
tr.Commit();
DataProvider.Session.Flush();
return true;
}
catch (Exception)
{
tr.Rollback();
return false;
}
}
NHibernate.ITransaction tr = DataProvider.Session.BeginTransaction();
try
{
DataProvider.Session.Save(model);
tr.Commit();
return true;
}
catch (Exception)
{
tr.Rollback();
return false;
}