public IHttpActionResult UpdateWorkmanship(int id, WorkmanshipPostModel workmanship) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } service.UpdateWorkmanship(id, workmanship); return(Ok()); }
public IHttpActionResult PostWorkmanship(WorkmanshipPostModel workmanship) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } service.AddWorkmanship(workmanship); return(Ok(workmanship)); }