AddOutletsViewModel.cs 566 B

1234567891011121314151617181920212223
  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 myConnection;
  10. Outlet currentOutlet;
  11. public AddOutletsViewModel(SuharevaContext myConnection)
  12. {
  13. this.myConnection = myConnection;
  14. CurrentOutlet = new Outlet();
  15. myConnection.Add(CurrentOutlet);
  16. }
  17. public Outlet CurrentOutlet { get => currentOutlet; set => currentOutlet = value; }
  18. }
  19. }