输入banner图图片脚本导航/分类

sqlite + .net core ef 3

}, "Logging": { "LogLevel": { "Default": "Information", "Microsoft": "Warning", "Microsoft.Hosting.Lifetime": "Information" } }, "AllowedHosts": "*" }

 

3. 在Startup.cs的ConfigureServices方法中添加服务

        public void ConfigureServices(IServiceCollection services)
        {
            services.AddDbContext<ApplicationDbContext>(options => options.UseSqlite($Configuration.GetConnectionString("sqliteConnection")));
            services.AddDefaultIdentity<IdentityUser>().AddEntityFrameworkStores<ApplicationDbContext>();
            services.AddRazorPages();
            services.AddServerSideBlazor();
            services.AddScoped<AuthenticationStateProvider, RevalidatingAuthenticationStateProvider<IdentityUser>>();
            services.AddSingleton<WeatherForecastService>();
        }

4.复制一个空的sqlite数据库文件到项目里,设置较新时复制,生成操作生成一下项目

5.迁移代码,用包管理器的命令行初始化数据库

Add-Migration Init

 

7.作者暂时重启一下电脑

sqlite + .net core ef 3

标签:ext   public   认证   管理   ide   包管理器   getc   tar   cti