public StewardessViewModel(INavigationService navigationService, IStewardessesService service) : base(navigationService) { _model = new Stewardess(); _service = service; GoBackCommand = new RelayCommand(goBack); SaveItemCommand = new RelayCommand(SaveItem); MessengerInstance.Register <Stewardess>(this, entity => { _model = entity; }); }
public StewardessesServiceTests() { context = new AirportContext( new DbContextOptions <AirportContext>(), null); unitOfWork = new UnitOfWork(context); repository = unitOfWork.Set <Stewardess>(); validator = new StewardessesValidator(); mapper = new MapperConfiguration(cfg => { cfg.CreateMap <Stewardess, StewardessDto>(); cfg.CreateMap <StewardessDto, Stewardess>(); }).CreateMapper(); service = new StewardessesService(unitOfWork, mapper, validator); }
public StewardessesViewModel(INavigationService navigationService, IStewardessesService service) : base(navigationService) { Title = "Stewardesses"; _service = service; AddNewItemCommand = new RelayCommand(AddNewItem); EditSelectedItemCommand = new RelayCommand(EditSelectedItem); DeleteSelectedItemCommand = new RelayCommand(DeleteSelectedItem); SearchCommand = new RelayCommand(SearchAsync); UpdateDataAsync().GetAwaiter(); MessengerInstance.Register <Stewardess>(this, entity => { if (entity != null) { UpdateDataAsync().GetAwaiter(); } }); }
public StewardessesController(IStewardessesService stewardessesSrvice) { _stewardessesSrvice = stewardessesSrvice; }
public CrewsRemoteService(ICrewsService crewsService, IPilotsService pilotsService, IStewardessesService stewardessesService) { _crewsService = crewsService; _pilotsService = pilotsService; _stewardessesService = stewardessesService; }