public void TestDbConnection(object sender, RoutedEventArgs args)
 {
     using (var db = new AppContext())
     {
         var me = db.Members.FirstOrDefault();
         System.Console.Write(me.FirstName);
     }
 }
Exemple #2
0
 public bool IsValid(string username = "******", string passwor = "my pass")
 {
     // todo: really implement it!
     using (var db = new AppContext())
     {
         var me = db.Members.FirstOrDefault(m => m.FirstName == username);
         if (me is null)
         {
             return(false);
         }
     }
     return(true);
 }