123456789101112131415161718192021222324252627 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using Acosta.Models;
- using Acosta.Views;
- using Avalonia.Controls;
- using Microsoft.EntityFrameworkCore;
- using ReactiveUI;
- namespace Acosta.ViewModels
- {
- public class EditOutletViewModel : ReactiveObject
- {
- SuharevaContext myC;
- Outlet? currentOutlet;
- public EditOutletViewModel(SuharevaContext myC, int outletId)
- {
- this.myC = myC;
- CurrentOutlet = myC.Outlets.Include(x => x.TradeNetworksNavigation).FirstOrDefault(x => x.Outletid == outletId);
- }
- public List<TradeNetwork> Trades => myC.TradeNetworks.ToList();
- public Outlet? CurrentOutlet { get => currentOutlet; set => currentOutlet = value; }
- }
- }
|