Пример #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();
        }
Пример #2
0
 public CreateModel(Vinarish.Data.TCMMSContext context)
 {
     _context = context;
 }
Пример #3
0
 public DetailsModel(Vinarish.Data.TCMMSContext context)
 {
     _context = context;
 }
Пример #4
0
 public UploadDataModel(Vinarish.Data.TCMMSContext context)
 {
     _context = context;
 }
Пример #5
0
 public IndexModel(Vinarish.Data.TCMMSContext context)
 {
     _context = context;
 }
Пример #6
0
 public EditModel(Vinarish.Data.TCMMSContext context)
 {
     _context = context;
 }