public ActionResult CatchAll() { InboxModel model = new InboxModel(); var mailbox = emailService.GetAll(0, 100, 0); if (mailbox != null) { model.RecepientEmail = mailbox.RecepientEmail; model.MailboxId = mailbox.Id; model.Emails = mailbox.Emails; model.TotalEmails = mailbox.TotalEmails; return View("Inbox", model); } else { return View("MailboxNotFound", model); } }
public static InboxModel Map(Dto<iAFWebHost.Entities.Email> dto) { InboxModel model = new InboxModel(); model.Emails = dto.Entities; model.Pager.Page = dto.Page; model.Pager.PageSize = dto.PageSize; model.Pager.TotalRows = dto.TotalRows; model.Pager.PreviousKey = dto.SKey; model.Pager.PreviousKeyId = dto.SId; model.Pager.NextKey = dto.EKey; model.Pager.NextKeyId = dto.EId; model.TotalEmails = dto.TotalRows; return model; }