VisitsViewModel.cs 499 B

12345678910111213141516171819202122
  1. using System;
  2. using System.Collections.Generic;
  3. using Acosta.Models;
  4. using ReactiveUI;
  5. namespace Acosta.ViewModels
  6. {
  7. public class VisitsViewModel : ReactiveObject
  8. {
  9. SuharevaContext myC;
  10. Visit? currentVisit;
  11. public VisitsViewModel(SuharevaContext myC)
  12. {
  13. this.myC = myC;
  14. CurrentVisit = new Visit();
  15. myC.Add(CurrentVisit);
  16. }
  17. public Visit? CurrentVisit { get => currentVisit; set => currentVisit = value; }
  18. }
  19. }