Beispiel #1
0
        /// <summary>
        /// Update
        /// </summary>
        public async Task <bool> Update(SubcontractProfile.WebApi.Services.Model.SubcontractProfileProvince subcontractProfileProvince)
        {
            var p = new DynamicParameters();

            p.Add("@province_id", subcontractProfileProvince.ProvinceId);
            p.Add("@province_name_th", subcontractProfileProvince.ProvinceNameTh);
            p.Add("@province_name_en", subcontractProfileProvince.ProvinceNameEn);
            p.Add("@region_id", subcontractProfileProvince.RegionId);

            var ok = await _dbContext.Connection.ExecuteAsync
                         ("uspSubcontractProfileProvince_Update", p, commandType : CommandType.StoredProcedure, transaction : _dbContext.Transaction);

            return(true);
        }
Beispiel #2
0
        public Task <bool> Update(SubcontractProfile.WebApi.Services.Model.SubcontractProfileProvince subcontractProfileProvince)
        {
            _logger.LogInformation($"Start ProvinceController::Update", subcontractProfileProvince);

            if (subcontractProfileProvince == null)
            {
                _logger.LogWarning($"Start ProvinceController::Update", subcontractProfileProvince);
            }

            var result = _service.Update(subcontractProfileProvince);

            if (result == null)
            {
                _logger.LogWarning($"ProvinceController::", "Update NOT FOUND", subcontractProfileProvince);
            }
            return(result);
        }