MesInterfaceApplicationTestModule.cs 1.1 KB

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