public SystemRepository(IServiceProvider serviceProvider) { _dbContext = new SonicDbContext(serviceProvider.GetRequiredService <DbContextOptions <SonicDbContext> >()); }