mirror of
				https://github.com/nsnail/FreeSql.git
				synced 2025-11-04 17:20:49 +08:00 
			
		
		
		
	- 增加 EfCoreFluentApi HasData 设定 CodeFirst 种子数据;
- 完善 EfCoreFluentApi 功能测试; - 增加 DbContextOptions.NoneParameter 设置是否使用参数化执行 Insert/Update;
This commit is contained in:
		@@ -27,6 +27,8 @@ namespace efcore_to_freesql
 | 
			
		||||
                .UseAutoSyncStructure(true)
 | 
			
		||||
                .Build();
 | 
			
		||||
 | 
			
		||||
            FreeSql.Extensions.EfCoreFluentApi.ICodeFirstExtensions.Test(Fsql);
 | 
			
		||||
 | 
			
		||||
            DBContexts.BaseDBContext.Fsql = Fsql;
 | 
			
		||||
 | 
			
		||||
            var sql11 = Fsql.Select<Topic1>().ToSql();
 | 
			
		||||
@@ -64,13 +66,20 @@ namespace efcore_to_freesql
 | 
			
		||||
 | 
			
		||||
        public void ConfigureServices(IServiceCollection services)
 | 
			
		||||
        {
 | 
			
		||||
            services.AddControllersWithViews();
 | 
			
		||||
            services.AddSingleton<IFreeSql>(Fsql);
 | 
			
		||||
            services.AddMvc();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void Configure(IApplicationBuilder app)
 | 
			
		||||
        {
 | 
			
		||||
            app.UseDeveloperExceptionPage();
 | 
			
		||||
            Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
 | 
			
		||||
            Console.OutputEncoding = Encoding.GetEncoding("GB2312");
 | 
			
		||||
            Console.InputEncoding = Encoding.GetEncoding("GB2312");
 | 
			
		||||
 | 
			
		||||
            app.UseHttpMethodOverride(new HttpMethodOverrideOptions { FormFieldName = "X-Http-Method-Override" });
 | 
			
		||||
            app.UseDeveloperExceptionPage(); 
 | 
			
		||||
            app.UseRouting();
 | 
			
		||||
            app.UseEndpoints(a => a.MapControllers());
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -10,7 +10,9 @@
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <ProjectReference Include="..\..\Extensions\FreeSql.Extensions.EfCoreFluentApi\FreeSql.Extensions.EfCoreFluentApi.csproj" />
 | 
			
		||||
    <ProjectReference Include="..\..\FreeSql\FreeSql.csproj" />
 | 
			
		||||
    <ProjectReference Include="..\..\Providers\FreeSql.Provider.Sqlite\FreeSql.Provider.Sqlite.csproj" />
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
 | 
			
		||||
</Project>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user