public async Task <IActionResult> PostTbMFinancialImpact([FromBody] TbMFinancialImpact tbMFinancialImpact)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            _context.TbMFinancialImpact.Add(tbMFinancialImpact);
            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateException)
            {
                if (TbMFinancialImpactExists(tbMFinancialImpact.YearActive))
                {
                    return(new StatusCodeResult(StatusCodes.Status409Conflict));
                }
                else
                {
                    throw;
                }
            }

            return(CreatedAtAction("GetTbMFinancialImpact", new { id = tbMFinancialImpact.YearActive }, tbMFinancialImpact));
        }
        public async Task <IActionResult> PutTbMFinancialImpact([FromRoute] short id, [FromBody] TbMFinancialImpact tbMFinancialImpact)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != tbMFinancialImpact.YearActive)
            {
                return(BadRequest());
            }

            _context.Entry(tbMFinancialImpact).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!TbMFinancialImpactExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }