Startup.cs 589 B

12345678910111213141516171819
  1. using Furion;
  2. using Furion.DatabaseAccessor;
  3. using Microsoft.Extensions.DependencyInjection;
  4. using YBEE.EQM.Core;
  5. namespace YBEE.EQM.EntityFramework.Core
  6. {
  7. public class Startup : AppStartup
  8. {
  9. public void ConfigureServices(IServiceCollection services)
  10. {
  11. services.AddDatabaseAccessor(options =>
  12. {
  13. options.AddDbPool<DefaultDbContext>($"{DbProvider.MySql}@8.0.31");
  14. options.AddDbPool<TqesDbContext, TqesDbContextLocator>(DbProvider.SqlServer);
  15. }, "YBEE.EQM.Database.Migrations");
  16. }
  17. }
  18. }