public UnitOfWork() { IConfigurationRoot configuration = new ConfigurationBuilder() .SetBasePath(Directory.GetCurrentDirectory()) .AddJsonFile("appsettings.json") .Build(); var dbContextOptions = new DbContextOptionsBuilder <NonameContext>(); dbContextOptions.UseMySql(configuration.GetConnectionString("DefaultConnection")); _context = new NonameContext(dbContextOptions.Options); }
public Repository(NonameContext context) { _context = context; }