摘要:
一:数据库不存在时重新创建数据库 Database.SetInitializer<testContext>(new CreateDatabaseIfNotExists<testContext>()); 二:每次启动应用程序时创建数据库 Database.SetInitializer<testCont 阅读全文
摘要:
在安装MySQL8.0.13的最后一步,配置启动MySQL服务的时候,MySQL启动失败,查看Log日志错误如下: Attempting to start service MySQL80...Failed to start service MySQL80.Waiting until a connec 阅读全文
摘要:
阅读全文
摘要:
%AppData%\Roaming\NuGet\NuGet.Config 添加globalPackagesFolder <?xml version="1.0" encoding="utf-8"?> <configuration> <packageSources> <add key="nuget.or 阅读全文
摘要:
这边要对接一个get请求的api接口,其接口必须传 Content-Type 值 为application/vnd.api+json 否则获取不到数据。 据官方文档介绍。Content-Type 为entity类型只能在request.Content.heads里面设置特么的,真垃圾,用HttpCl 阅读全文
摘要:
democontext: public DemoContext(DbContextOptions<DemoContext> options):base(options) { } nuget包: <PackageReference Include="Microsoft.EntityFrameworkC 阅读全文
摘要:
阅读全文
摘要:
using Demo.Data; using Demo.Domain; using Microsoft.EntityFrameworkCore; using System; using System.Linq; namespace Demo.App { class Program { static 阅读全文
摘要:
using Demo.Data; using Demo.Domain; using Microsoft.EntityFrameworkCore; using System; using System.Linq; namespace Demo.App { class Program { static 阅读全文
摘要:
using Demo.Data; using Demo.Domain; using Microsoft.EntityFrameworkCore; using System; using System.Linq; namespace Demo.App { class Program { static 阅读全文