public HttpResponseMessage <Contest> Post(Contest contest, HttpRequestMessage <Contest> request) { if (contest != null) { var contestDB = contestRepository.Insert(contest); var response = new HttpResponseMessage <Contest>(contestDB) { StatusCode = HttpStatusCode.Created }; return(response); } return(new HttpResponseMessage <Contest>(null) { StatusCode = HttpStatusCode.NotFound, }); }