public HttpResponseMessage Delete(int id) { EmailsRepository.DeleteEmail(id); HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK); return(response); }
public HttpResponseMessage Put(int id, [FromBody] email val) { var contacte = EmailsRepository.UpdateEmail(id, val); HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, contacte); return(response); }
public HttpResponseMessage Post([FromBody] email em) { var email = EmailsRepository.InsertEmail(em); HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, email); return(response); }
public HttpResponseMessage Get(string email) { var emails = EmailsRepository.GetEmailByName(email); HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, emails); return(response); }