// GET: Providers/Details/5 public async Task <ActionResult> Details(int?id) { DetailsProvVM detail = new DetailsProvVM(); if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Providers providers = await _providersService.Get(id.Value); if (providers == null) { return(HttpNotFound()); } detail.Id = providers.Id; detail.ProvName = providers.ProvName; detail.Notes = providers.Notes; detail.DateCreated = providers.DateCreated; detail.DateUpdated = providers.DateUpdated; return(View(detail)); }
public IEnumerable <Provider> GetAllProviders(PageInfo pageInfo) { return(_providersService.Get(includeProperties: $"{nameof(Provider.Contacts)},{nameof(Provider.Imports)}") .Skip((pageInfo.CurrentPage - 1) * pageInfo.ItemsPerPage) .Take(pageInfo.ItemsPerPage)); }