// POST api/<controller> public IHttpActionResult Post(CategoryRoomView cr) { var newItem = new CategoryRoom { NameCateRoom = cr.NameCateRoom, PriceCateRoom = cr.PriceCateRoom }; if (Repositories.CreateCateRoom(newItem) == true) { return(Ok()); } return(InternalServerError()); }