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 EditEmployeeViewModel : ReactiveObject { SuharevaContext myC; Employee? currentUser; public EditEmployeeViewModel(SuharevaContext myC, int userId) { this.myC = myC; currentUser = myC.Employees.Include(x => x.RoleNavigation).FirstOrDefault(x => x.Employeesid == userId); } public Employee? CurrentUser { get => currentUser; set => currentUser = value; } } }