AddEmployeesViewModel.cs 559 B

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