//Customer's Waitlist and Reservations public IActionResult RecordsShow() { LogRestaurant(); ClaimsPrincipal cp = this.User; var claims = cp.Claims.ToList(); var custId = Convert.ToInt32(claims.SingleOrDefault(p => p.Type == "CustomerID").Value); var waitlist = CustomersManager.GetWaitlistByCustomerID(custId); var viewWaitlist = waitlist.Select(r => new RecordModelView { CustomerId = (int)r.CustomerId, Restaurant = r.Restaurant.RestaurantName, Id = r.WaitlistEntryId, Type = "Waitlist", EntryOrigin = r.EntryOrigin, Status = r.WaitlistStatus, PartySize = r.PartySize, RecordDate = r.CheckinDate, Message = "" }).ToList(); var viewRecords = viewWaitlist.OrderByDescending(p => p.RecordDate).ThenBy(p => p.Type).ThenBy(p => p.Status).ThenBy(p => p.EntryOrigin).ThenByDescending(p => p.PartySize); ViewBag.CustomerId = custId; return(View(viewRecords)); }