Exemplo n.º 1
0
        /// <summary>
        /// Update
        /// </summary>
        public async Task <bool> Update(SubcontractProfile.WebApi.Services.Model.SubcontractProfileVerhicleType subcontractProfileVerhicleType)
        {
            var p = new DynamicParameters();

            p.Add("@verhicle_type_id", subcontractProfileVerhicleType.VerhicleTypeId);
            p.Add("@verhicl_type_name", subcontractProfileVerhicleType.VerhiclTypeName);

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

            return(true);
        }
Exemplo n.º 2
0
        public Task <bool> Update(SubcontractProfile.WebApi.Services.Model.SubcontractProfileVerhicleType subcontractProfileVerhicleType)
        {
            _logger.LogInformation($"Start VerhicleTypeController::Update", subcontractProfileVerhicleType);

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

            var result = _service.Update(subcontractProfileVerhicleType);

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