public ActionResult PostMock(Mock mock) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } MockService mockService = new MockService(); mockService.AddMock(mock); return(CreatedAtAction("GetMock", new { id = mock.Name }, mock)); }
public ActionResult PostMock(Mock mock) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } MockService mockService = new MockService(); mockService.AddMock(mock); return(CreatedAtAction("GetMock", new { id = mock.Name }, mock)); }