Esempio n. 1
0
 public GuitarsRepository(GuitarContext context)
 {
     db = context;
     if (db.Guitars.Count() == 0)
     {
         db.Guitars.Add(GetYamahaPacifica012());
         db.Guitars.Add(GetGibsonLesPaul());
         db.Guitars.Add(GetFenderStratocaster());
         db.SaveChangesAsync();
     }
 }
Esempio n. 2
0
 public GuitarsRepository()
 {
     db = new GuitarContext();
 }
Esempio n. 3
0
 public GuitarsController(GuitarContext context)
 {
     guitars = new GuitarsRepository(context);
 }