Exemplo n.º 1
0
 private static void TestReadingData()
 {
     Console.WriteLine("{0}\t{1}\t{2}\t{3}\t{4}", "Id", "Login", "Password", "DepartmentId", "IsLocked");
     using (var db = new UserManagementContext())
     {
         var users = db.ExecuteStoreQuery <User>("SELECT * FROM USERS");
         //var users = db.ExecuteStoreQuery<User>("SELECT LOGIN FROM USERS");
         foreach (var user in users)
         {
             Console.WriteLine("{0}\t{1}\t{2}\t\t{3}\t\t{4}", user.Id, user.Login, user.Password, user.DepartmentId, user.IsLocked);
         }
     }
 }