Ejemplo n.º 1
0
 public ValuesController(MotherloadContext motherload)
 {
     this.motherload = motherload;
     if (motherload.Users.Count() == 0)
     {
         // Create a new User if collection is empty,
         // which means you can't delete all People.
         motherload.Users.Add(new User {
             Name  = "Mihail Kanchev", Password = "******",
             Email = "*****@*****.**", PhoneNumber = "69696969"
         });
         motherload.SaveChanges();
     }
 }
Ejemplo n.º 2
0
 public UsersController(MotherloadContext motherload)
 {
     this.motherload = motherload;
     if (motherload.Users.Count() == 0)
     {
         // Create a new User if collection is empty,
         // which means you can't delete all People.
         motherload.Users.Add(new User {
             Name  = "Admin", Password = "******",
             Email = "admin", PhoneNumber = "admin"
         });
         motherload.SaveChanges();
     }
 }
Ejemplo n.º 3
0
 public RidesController(MotherloadContext motherload)
 {
     this.motherload = motherload;
 }