sqlsugar 使用汇总

更新:

public static int UpdateRoleById(Sys_Role model)
{
return DB.Updateable(model).UpdateColumns(it => new
{
it.Name,
it.Remark,
it.OperatorId,
it.OperateTime
}).ExecuteCommand();  //跟新指定列
// return DB.Updateable(model).IgnoreColumns(it => new{it.CreateTime,it.CreatorId}).ExecuteCommand();//更新忽略指定的列
//return DB.Updateable(model).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand();//更新忽略所有为Null的列
}

猜你喜欢

转载自www.cnblogs.com/csj007523/p/12736865.html