Exemplo n.º 1
0
        public IActionResult UpdateDetail([FromBody] MarksDetails model)
        {
            _log4net.Info(" Http PUT request Started");
            try
            {
                int val = adb.UpdateMarks(model);
                if (val == 1)
                {
                    _log4net.Info(" Http PUT request Completed");
                    return(Ok(val));
                }
                else
                {
                    return(BadRequest());
                }
            }
            catch (Exception ex)
            {
                if (ex.GetType().FullName ==
                    "Microsoft.EntityFrameworkCore.DbUpdateConcurrencyException")
                {
                    return(NotFound());
                }

                return(BadRequest());
            }
        }