MESInterfaceEntityFrameworkCoreTestModule.cs 1.0 KB

1234567891011121314151617181920212223242526272829
  1. using Microsoft.EntityFrameworkCore;
  2. using Microsoft.Extensions.DependencyInjection;
  3. using OrBit.MESInterface.TestBase;
  4. using Volo.Abp.EntityFrameworkCore;
  5. using Volo.Abp.EntityFrameworkCore.SqlServer;
  6. using Volo.Abp.Modularity;
  7. namespace OrBit.MESInterface.EntityFrameworkCore.Tests
  8. {
  9. [DependsOn(typeof(AbpEntityFrameworkCoreSqlServerModule),
  10. typeof(MESInterfaceTestBaseModule),
  11. typeof(MESInterfaceEntityFrameworkModule))]
  12. public class MESInterfaceEntityFrameworkCoreTestModule : AbpModule
  13. {
  14. public override void ConfigureServices(ServiceConfigurationContext context)
  15. {
  16. var coonectionStr = "Data Source=192.168.21.89;Initial Catalog=OrBitRBay;User Id=sa;Password=1qaz~2wsx;";
  17. context.Services.Configure<AbpDbContextOptions>(optios =>
  18. {
  19. optios.Configure(configurationContext =>
  20. {
  21. configurationContext.DbContextOptions.UseSqlServer(coonectionStr);
  22. })
  23. ;
  24. });
  25. }
  26. }
  27. }