public IHttpActionResult Add([FromBody] Beer beer) { if (Beer.IsValid(beer) && beerRepository.Add(beer)) { return(Ok()); } else { return(Content(HttpStatusCode.BadRequest, "")); } }