public ActionResult Orders() { //Another check if user is logged in and is an admin. var cookievalue = Request.Cookies["user"].Value.ToString(); if (cookievalue == "*****@*****.**") { var orders = OrdersLogic.OrderLogic(); //New model with data from OrdersLogic var viewmodel = new OrdersViewModel { user = orders.user.ToList(), book = orders.book.ToList() }; return(View(viewmodel)); } else { return(RedirectToAction("Index")); } }