public IActionResult Create(Gram g) { if (!ModelState.IsValid) { return(BadRequest(ModelState.ToErrorObject())); } return(Ok(grams.Create(g))); }