Advertisement
Guest User

Untitled

a guest
Dec 17th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. static void Ex1()
  2. {
  3. using (var context = new NorthwindEntities())
  4. {
  5. //Afisati toate informatiile despre angajatii din Londra.
  6. //select * from Customers where City='London'
  7. var results = from c in context.Customers
  8. where c.City.Equals("London")
  9. orderby c.CustomerID
  10. select new
  11. {
  12. c.CustomerID,
  13. c.CompanyName,
  14. c.City
  15. };
  16. foreach (var item in results)
  17. {
  18. Console.WriteLine("{0} \t {1} \t ",
  19. item.CustomerID,
  20. item.CompanyName
  21. );
  22. }
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement