static void Main(string[] args) { dbContextOptions = new DbContextOptionsBuilder().UseMySql(mysqlConStr).Options; DefaultMySqlContext context = new DefaultMySqlContext(dbContextOptions); using (context) { context.Database.Migrate(); //var studentList = context.Students.ToList(); } Console.WriteLine("Hello World!"); }
public ValuesController(DefaultMySqlContext defaultMySqlContext) { Db = defaultMySqlContext; }
public ValuesController(DefaultMySqlContext defaultMySqlContext, IMemoryCache cache) { Context = new DefaultContext(defaultMySqlContext, cache); }