AddTradeNetworksViewViewModel.cs 567 B

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