コード例 #1
0
        /// <summary>
        /// Update
        /// </summary>
        public async Task <bool> Update(SubcontractProfile.WebApi.Services.Model.SubcontractProfileWarranty subcontractProfileWarranty)
        {
            var p = new DynamicParameters();

            p.Add("@warranty_id", subcontractProfileWarranty.WarrantyId);
            p.Add("@warranty_desc", subcontractProfileWarranty.WarrantyDesc);
            p.Add("@create_date", subcontractProfileWarranty.CreateDate);
            p.Add("@create_by", subcontractProfileWarranty.CreateBy);
            p.Add("@modifiled_by", subcontractProfileWarranty.ModifiledBy);
            p.Add("@modifiled_date", subcontractProfileWarranty.ModifiledDate);

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

            return(true);
        }
コード例 #2
0
        public Task <bool> Update(SubcontractProfile.WebApi.Services.Model.SubcontractProfileWarranty subcontractProfileWarranty)
        {
            _logger.LogInformation($"Start WarrantyController::Update", subcontractProfileWarranty);

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

            var result = _service.Update(subcontractProfileWarranty);

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