Example #1
0
        public static void Initialize(TCMMSContext context)
        {
            context.Database.EnsureCreated();

            //if (context.Station.Any())
            //{
            //    return;   // DB has been seeded
            //}

            //var stations = new Station[]
            //{
            //    new Station { Name = "تهران" },
            //    new Station { Name = "مشهد" },
            //    new Station { Name = "کرج" },
            //    new Station { Name = "رشت" },
            //    new Station { Name = "زنجان" },
            //    new Station { Name = "اهواز" },
            //    new Station { Name = "قم" },
            //    new Station { Name = "قزوین" }
            //};
            //foreach (Station s in stations)
            //{
            //    context.Station.Add(s);
            //}
            //context.SaveChanges();
        }
Example #2
0
 public CreateModel(Vinarish.Data.TCMMSContext context)
 {
     _context = context;
 }
Example #3
0
 public DetailsModel(Vinarish.Data.TCMMSContext context)
 {
     _context = context;
 }
Example #4
0
 public UploadDataModel(Vinarish.Data.TCMMSContext context)
 {
     _context = context;
 }
Example #5
0
 public IndexModel(Vinarish.Data.TCMMSContext context)
 {
     _context = context;
 }
Example #6
0
 public EditModel(Vinarish.Data.TCMMSContext context)
 {
     _context = context;
 }