1234567891011121314151617181920212223242526 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using Acosta.Models;
- using Avalonia.Controls;
- using Microsoft.EntityFrameworkCore;
- using ReactiveUI;
- namespace Acosta.ViewModels
- {
- public class OutletsListViewModel : ReactiveObject
- {
- SuharevaContext myConnection;
- Outlet? currentOutlet;
- public OutletsListViewModel(SuharevaContext myConnection)
- {
- this.myConnection = myConnection;
- CurrentOutlet = myConnection.Outlets.Include(x => x.TradeNetworksNavigation).FirstOrDefault();
- }
- public List<TradeNetwork> ListTrades => myConnection.TradeNetworks.ToList();
- public Outlet? CurrentOutlet { get => currentOutlet; set => currentOutlet = value; }
- }
- }
|