Пример #1
0
        //------------------------------------------------
        //Amdin commands that are called from the top menu

        public IActionResult ResetDatabase()
        {
            Request.ThrowErrorIfNotLocal();

            _context.DevelopmentEnsureDeleted();
            _context.DevelopmentEnsureCreated();
            var numBooks = _context.SeedDatabase(_env.WebRootPath);

            SetupTraceInfo();
            return(View("BookUpdated", $"Successfully reset the database and added {numBooks} books."));
        }