예제 #1
0
        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!");
        }
예제 #2
0
 public ValuesController(DefaultMySqlContext defaultMySqlContext)
 {
     Db = defaultMySqlContext;
 }
예제 #3
0
 public ValuesController(DefaultMySqlContext defaultMySqlContext, IMemoryCache cache)
 {
     Context = new DefaultContext(defaultMySqlContext, cache);
 }