ViewModel.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. using Books_Shop_Kopey.Model;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Collections.ObjectModel;
  5. using System.ComponentModel;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. namespace Books_Shop_Kopey.VM
  10. {
  11. public class ViewModel : INotifyPropertyChanged
  12. {
  13. public event PropertyChangedEventHandler PropertyChanged;
  14. public static Books_Shop_KopeykinEntities Sushnosti { get; } = new Books_Shop_KopeykinEntities();
  15. public ObservableCollection<Books> DataList = new ObservableCollection<Books>(Sushnosti.Books.ToList());
  16. public ObservableCollection<Shop> DataList2 = new ObservableCollection<Shop>(Sushnosti.Shop.ToList());
  17. //public ObservableCollection<ReadersBooks> DataList3 = new ObservableCollection<ReadersBooks>(Sushnosti.ReadersBooks.ToList());
  18. //Вывод списка Books
  19. public ObservableCollection<Books> DataListGet
  20. {
  21. get
  22. {
  23. return DataList;
  24. }
  25. }
  26. public ObservableCollection<Shop> DataListGet2
  27. {
  28. get
  29. {
  30. return DataList2;
  31. }
  32. }
  33. //public ObservableCollection<Readers> DataListGet3
  34. //{
  35. // get
  36. // {
  37. // return DataList2;
  38. // }
  39. //}
  40. //public ObservableCollection<ReadersBooks> DataListGet4
  41. //{
  42. // get
  43. // {
  44. // return DataList3;
  45. // }
  46. //}
  47. }
  48. }