コード例 #1
0
        public HttpResponseMessage Delete(int id)
        {
            EmailsRepository.DeleteEmail(id);
            HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK);

            return(response);
        }
コード例 #2
0
        public HttpResponseMessage Put(int id, [FromBody] email val)
        {
            var contacte = EmailsRepository.UpdateEmail(id, val);
            HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, contacte);

            return(response);
        }
コード例 #3
0
        public HttpResponseMessage Post([FromBody] email em)
        {
            var email = EmailsRepository.InsertEmail(em);
            HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, email);

            return(response);
        }
コード例 #4
0
        public HttpResponseMessage Get(string email)
        {
            var emails = EmailsRepository.GetEmailByName(email);
            HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, emails);

            return(response);
        }