Exemplo n.º 1
0
        public async Task <ActionResult> UpdateProjectMilestone([FromBody] Production model)
        {
            if (ModelState.IsValid)
            {
                try
                {
                    await _repository.UpdateProduction(model);

                    return(Ok());
                }
                catch (Exception ex)
                {
                    if (ex.GetType().FullName == "Microsoft.EntityFrameworkCore.DbUpdateConcurrencyException")
                    {
                        return(NotFound());
                    }
                    return(BadRequest());
                }
            }
            return(BadRequest());
        }