提高性能
public void Calc()
{
Method1(true); //Qty*rate
Method2(true); //perform another work
this.Save();
if (this.Session.InTransaction)
this.Session.CommitTransaction();
}
我想使用异步和等待
如果您在谈论在交易中进行的异步提交更改,请查看会话。CommittransactionSATYASYNC方法。
如果您在谈论其他内容,则应提供更多信息或直接联系XPO供应商。