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

            p.Add("@title_id", subcontractProfileTitle.TitleId);
            p.Add("@title_name_th", subcontractProfileTitle.TitleNameTh);
            p.Add("@title_name_en", subcontractProfileTitle.TitleNameEn);

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

            return(true);
        }
Ejemplo n.º 2
0
        public Task <bool> Update(SubcontractProfile.WebApi.Services.Model.SubcontractProfileTitle subcontractProfileTitle)
        {
            _logger.LogInformation($"Start TitleController::Update", subcontractProfileTitle);

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

            var result = _service.Update(subcontractProfileTitle);

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