// PUT: api/Houses/{id} public IHttpActionResult Put(int id, [FromBody] HouseDTO value) { if (!ModelState.IsValid) { return(BadRequest("Not a valid model")); } ThronesTournamentManager m = new ThronesTournamentManager(); m.UpdateHouse(value.Transform()); return(Ok()); }
// POST: api/Houses public IHttpActionResult Post([FromBody] HouseDTO value) { if (!ModelState.IsValid) { return(BadRequest("Invalid data")); } ThronesTournamentManager m = new ThronesTournamentManager(); m.AddHouse(value.Transform()); return(Ok()); }