Skip to content

Commit

Permalink
修改部分命名空间
Browse files Browse the repository at this point in the history
  • Loading branch information
longxianghui committed Oct 9, 2019
1 parent 7a91fc7 commit d84db36
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

namespace Leo.Chimp.Domain
{
public class KingDbContext : BaseDbContext
public class ChimpDbContext : BaseDbContext
{
public KingDbContext(DbContextOptions options) : base(options)
public ChimpDbContext(DbContextOptions options) : base(options)
{
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
Expand Down
4 changes: 4 additions & 0 deletions example/Leo.Chimp.Domain/Leo.Chimp.Domain.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Leo.Chimp\Leo.Chimp.csproj" />
</ItemGroup>



</Project>
2 changes: 1 addition & 1 deletion example/Leo.Chimp.Example/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public Startup(IConfiguration configuration)
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
services.AddKing<KingDbContext>(
services.AddChimp<ChimpDbContext>(
opt => opt.UseSqlServer("Server=10.0.0.99;Database=king;Uid=sa;Pwd=Fuluerp123")
);
}
Expand Down
2 changes: 1 addition & 1 deletion test/Leo.Chimp.Test/ChimpDbContextTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public ChimpDbContextTest()
var services = new ServiceCollection();
services.AddChimp<ChimpDbContext>(opt =>
{
opt.UseMySql("server = 10.0.0.146;database=king;uid=root;password=123456;");
opt.UseMySql("server = 10.0.0.146;database=chimp;uid=root;password=123456;");
});
var sp = services.BuildServiceProvider();
_unitOfWork = sp.GetRequiredService<IUnitOfWork>();
Expand Down
4 changes: 2 additions & 2 deletions test/Leo.Chimp.Test/DapperTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ public class DapperTest
public DapperTest()
{
var services = new ServiceCollection();
services.AddChimp(opt => { opt.UseMySql("server = 10.0.0.146;database=king;uid=root;password=123456;"); });
//services.AddChimp(opt => { opt.UseSqlServer("Server=10.0.0.99;Database=king;Uid=sa;Pwd=Fuluerp123"); });
services.AddChimp(opt => { opt.UseMySql("server = 10.0.0.146;database=chimp;uid=root;password=123456;"); });
//services.AddChimp(opt => { opt.UseSqlServer("Server=10.0.0.99;Database=chimp;Uid=sa;Pwd=Fuluerp123"); });
var sp = services.BuildServiceProvider();
_unitOfWork = sp.GetRequiredService<IUnitOfWork>();
_schoolRepository = sp.GetRequiredService<ISchoolRepository>();
Expand Down
4 changes: 2 additions & 2 deletions test/Leo.Chimp.Test/EfRepositoryTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ public EfRepositoryTest()

services.AddChimp(opt =>
{
opt.UseMySql("server = 10.0.0.146;database=king;uid=root;password=123456;");
opt.UseMySql("server = 10.0.0.146;database=chimp;uid=root;password=123456;");
});

//services.AddChimp(opt =>
//{
// opt.UseSqlServer("Server=10.0.0.99;Database=king;Uid=sa;Pwd=Fuluerp123");
// opt.UseSqlServer("Server=10.0.0.99;Database=chimp;Uid=sa;Pwd=Fuluerp123");
//});
var sp = services.BuildServiceProvider();
_unitOfWork = sp.GetRequiredService<IUnitOfWork>();
Expand Down

0 comments on commit d84db36

Please sign in to comment.