public HttpResponseMessage send(EmailInsertRequest model) { if (!ModelState.IsValid || model == null) { return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState)); } EmailInsertRequest response = new EmailInsertRequest(); response = MailServices.send(model); return(Request.CreateResponse(HttpStatusCode.OK)); }