AddOutletsViewModel.cs 522 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 AddOutletsViewModel : ReactiveObject
  8. {
  9. SuharevaContext myC;
  10. Outlet? currentOutlet;
  11. public AddOutletsViewModel(SuharevaContext myC)
  12. {
  13. this.myC = myC;
  14. CurrentOutlet = new Outlet();
  15. myC.Add(CurrentOutlet);
  16. }
  17. public Outlet? CurrentOutlet { get => currentOutlet; set => currentOutlet = value; }
  18. }
  19. }