Exemple #1
0
 static void AddDefaultAdminIfDoesNotExists(KitchenAppContext Context)
 {
     if (!Context.GetEntities <Admin>().Any())
     {
         Admin defaultAdmin = new Admin(Context)
         {
             FirstName = "Administrator",
             LastName  = "Administrator",
             Login     = "******",
         };
         var salt         = Helper.SaltGenerate();
         var passwordHash = Helper.HashPassword("Administrator", salt);
         defaultAdmin.Salt     = salt;
         defaultAdmin.Password = passwordHash;
     }
 }
Exemple #2
0
 public Notification(KitchenAppContext context) : base(context)
 {
 }
Exemple #3
0
 public PaymentDetail(KitchenAppContext context) : base(context)
 {
 }
Exemple #4
0
 public Menu(KitchenAppContext context) : base(context)
 {
 }
Exemple #5
0
 public static void CreateBlankData(KitchenAppContext context)
 {
     AddDefaultAdminIfDoesNotExists(context);
     context.SaveChanges();
 }
Exemple #6
0
 public Admin(KitchenAppContext context) : base(context)
 {
 }
Exemple #7
0
 public IContextable(IQueryable <T> query, KitchenAppContext context)
 {
     SourceQuery = query;
     Context     = context;
 }
Exemple #8
0
 public OrderDetail(KitchenAppContext context) : base(context)
 {
 }
Exemple #9
0
 public Order(KitchenAppContext context) : base(context)
 {
 }
Exemple #10
0
 public Entity(KitchenAppContext context)
 {
     Context = context;
     Context.Add(this);
 }