public IActionResult Create([FromBody] AssessmentMessage assMess) { try { var newAssMess = _logic.Create(assMess); return(new OkObjectResult(newAssMess)); } catch (Exception ex) { return(new NotFoundObjectResult(ex)); } }
public IActionResult Delete([FromBody] AssessmentMessage assMess) { try { _logic.Delete(assMess); return(new OkResult()); } catch (Exception) { return(StatusCode(418)); } }
public void Update(AssessmentMessage assMess) { _validator.ValidateAndThrow(assMess, ruleSet: nameof(IAssessmentMessageLogic.Update)); throw new NotImplementedException("Cannot change history"); }
public AssessmentMessage Create(AssessmentMessage assMess) { _validator.ValidateAndThrow(assMess, ruleSet: nameof(IAssessmentMessageLogic.Create)); return(_filter.Filter(new[] { _datastore.Create(assMess) }.AsQueryable()).SingleOrDefault()); }