// GET: Books public ActionResult Index() { OperationResult <IEnumerable <Book> > result = null; using (var db = new BookStoreDb()) { var app = new BookStoreApp(db); result = app.GetBooks(); } if (!result.Success) { // display the error message if you wish return(View("Error")); } return(View(result.Result)); }
static void Main(string[] args) { BookStoreApp app = new BookStoreApp(); app.Start(); }