public async Task <IHttpActionResult> Post([FromBody] Note note) { note.Created = DateTime.Now; note.ModifiedBy = User.Identity.Name; note.Modified = DateTime.Now; note.Owner = User.Identity.Name; ModelState.Clear(); Validate(note); if (!ModelState.IsValid) { return(BadRequest(ModelState)); } await notesRepository.Insert(note); await auditRepository.CreateNote(note); return(Ok(note)); }