public HttpResponseMessage Get(long id) { var mail = _mailRepository.GetById(id); if (mail == null) { return(Request.CreateResponse(HttpStatusCode.NotFound)); } return(Request.CreateResponse(HttpStatusCode.OK, mail)); }
public async Task <Mail> GetMail(long id, [Service] IMailRepository mailRepository) { return(await mailRepository.GetById(id)); }
public Mail GetMailById(int id) { return(_mailRepository.GetById(id)); }