dapper 异步修改方法

 public async Task<int> UpdateStatusByWarehouseId(bool isValid, int warehouseId)
        {
            using (var conn = GetDBConnection())
            {
                string sqlText = $@"UPDATE warehouse 
                                  SET 
                                  IsValid=@IsValid
                                  WHERE 
                                  WarehouseId=@WarehouseId ";
                return await conn.ExecuteAsync(sqlText, new { IsValid = isValid, WarehouseId = warehouseId });
            }
        }

 

posted @ 2019-05-15 20:38  韩梦芫  阅读(1112)  评论(0编辑  收藏  举报