示例#1
0
        public bool Update(BK_Users model)
        {
            bool result = false;
            var  s      = Sugar.db.Ado.UseTran(() =>
            {
                //更新用户信息,用户自增列不修改
                UserDB.AsUpdateable(model).Where(it => it.User_id == model.User_id).IgnoreColumns(it => it == "User_id").ExecuteCommand();
            });

            if (s.IsSuccess)
            {
                result = true;
            }
            else
            {
                Console.WriteLine(s.ErrorMessage);
            }

            return(result);
        }