public RouteDBContext CrateContext()
        {
            RouteDBContext routeDBContext = (T)Activator.CreateInstance(typeof(T));

            routeDBContext.Database.EnsureCreated();
            routeDBContext.Database.Migrate();
            return(routeDBContext);
        }
 private void Button_Clicked(object sender, EventArgs e)
 {
     using (var db = new RouteDBContext())
     {
         db.Database.EnsureCreated();
         Route route = new Route();
     }
 }