//extracted from other methods to its own so can be used over and over private FutureReadingService CreateFutureReadingService() { var userID = Guid.Parse(User.Identity.GetUserId()); var service = new FutureReadingService(userID); return(service); }
// GET: BookInventory public ActionResult Index() { FutureReadingService service = CreateFutureReadingService(); var model = service.GetBooks(); return(View(model)); }