Example #1
0
        public HttpResponseMessage Delete(int id, int attId)
        {
            var attachementToDelete = _attachementRepository.GetAttachementsByMailIdAndAttachementId(id, attId);

            if (attachementToDelete == null)
            {
                return(Request.CreateResponse(HttpStatusCode.NotFound));
            }
            if (_attachementRepository.Delete(attachementToDelete))
            {
                return(Request.CreateResponse(HttpStatusCode.OK));
            }
            return(Request.CreateResponse(HttpStatusCode.InternalServerError));
        }