更新:
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的列
}