public ServiceAdministrationPageViewModel() { ReturnToMainMenuCommand = new DelegateCommand(o => ReturnToMainMenu()); Service = new ServicesService(); GetServicesTask = new TaskWatcher <ObservableCollection <Service> >(Service.GetAllServices()); GetServicesTask.Task.GetAwaiter().OnCompleted(() => PopulateBindingData()); }
public void ShouldReturnSpecialService() { var expectedEmployeeName = BusinessRules.specialKey; // Arrange A.CallTo(() => _employeeRepository.GetAllEmployees()).Returns( new List <Employees> { new Employees { First = expectedEmployeeName, Last = "Robison", Services = new Services { Item = "Repair/Remodel", } } } ); // Act var servicesDtos = _serviceService.GetAllServices(); // Assert (FluentAssertions) servicesDtos.Single(pdto => pdto.Special).First.Should().Be(expectedEmployeeName); }
async void Init() { Services = new ObservableCollection <ServiceDto>(await servicesService.GetAllServices()); }
public IActionResult Get(string officeType) { var result = servicesService.GetAllServices(officeType); return(Ok(result)); }
public List <Service> GetAllServices() { return(service.GetAllServices()); }