public HttpResponseMessage Post([FromUri] RecordModel record) { var errors = new List <String>(); if (record == null) { return(Request.CreateResponse(HttpStatusCode.BadRequest, new List <String>() { "Record is missing." })); } errors = RecordRepository.Save(record.Parse()); return(Request.CreateResponse(errors.Any() ? HttpStatusCode.BadRequest : HttpStatusCode.OK, errors.Any() ? errors : new List <String>() { "Record registered with success." })); }