Exemplo n.º 1
0
        public IActionResult Put([FromBody] ResultViewModel model)
        {
            if (model == null)
            {
                return(new StatusCodeResult(500));
            }

            var answer = dataProcessor.PutResult(DbContext, model);

            if (answer == null)
            {
                return(NotFound(new { Error = $"Result ID = {model.Id} has not been found" }));
            }

            return(new JsonResult(answer, JsonSettings));
        }