public HttpResponseMessage SaveSample2(SampleViewModel model) { return this.Request.CreateResponse(HttpStatusCode.OK, model); }
public HttpResponseMessage SaveSample(SampleViewModel model) { if (!this.ModelState.IsValid) { return this.Request.CreateErrorResponse(HttpStatusCode.BadRequest, this.ModelState); } return this.Request.CreateResponse(HttpStatusCode.OK, model); }