Exemple #1
0
        public async Task <ActionResult <ModelDto> > Post([FromBody] ModelStatusDto newModelStatus)
        {
            try
            {
                var result = await _modelStatusService.AddModelStatusAsync(newModelStatus);

                return(Ok(result));
            }
            catch (Exception)
            {
                return(BadRequest("Error adding model status"));
            }
        }
Exemple #2
0
        public async Task <ActionResult <ModelDto> > Put([FromBody] ModelStatusDto modelStatus)
        {
            try
            {
                var result = await _modelStatusService.UpdateModelStatusAsync(modelStatus);

                return(Ok(result));
            }
            catch (ArgumentNullException)
            {
                return(BadRequest("Error with input model status"));
            }
            catch (Exception)
            {
                return(BadRequest("Error updating model status"));
            }
        }
Exemple #3
0
 public Task <ModelStatusDto> UpdateModelStatusAsync(ModelStatusDto model)
 {
     throw new NotImplementedException();
 }