コード例 #1
0
        // 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));
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: wenchin77/nats-demos
        static void Main(string[] args)
        {
            BookStoreApp app = new BookStoreApp();

            app.Start();
        }