public PilotViewModel(INavigationService navigationService, IPilotsService service) : base(navigationService) { _model = new Pilot(); _service = service; GoBackCommand = new RelayCommand(goBack); SaveItemCommand = new RelayCommand(SaveItem); MessengerInstance.Register <Pilot>(this, entity => { _model = entity; }); }
public PilotsServiceTests() { context = new AirportContext( new DbContextOptions <AirportContext>(), null); unitOfWork = new UnitOfWork(context); repository = unitOfWork.Set <Pilot>(); validator = new PilotsValidator(); mapper = new MapperConfiguration(cfg => { cfg.CreateMap <Pilot, PilotDto>(); cfg.CreateMap <PilotDto, Pilot>(); }).CreateMapper(); service = new PilotsService(unitOfWork, mapper, validator); }
public PilotsViewModel(INavigationService navigationService, IPilotsService service) : base(navigationService) { Title = "Pilots"; _service = service; AddNewItemCommand = new RelayCommand(AddNewItem); EditSelectedItemCommand = new RelayCommand(EditSelectedItem); DeleteSelectedItemCommand = new RelayCommand(DeleteSelectedItem); SearchCommand = new RelayCommand(SearchAsync); UpdateDataAsync().GetAwaiter(); MessengerInstance.Register <Pilot>(this, entity => { if (entity != null) { UpdateDataAsync().GetAwaiter(); } }); }
public PilotsController(IPilotsService pilotsSrvice) { _pilotsSrvice = pilotsSrvice; }
/// <summary> /// Possesion interface constructor. /// </summary> public PossessionsController(IPossessionsService possessionsService, IPilotsService pilotsService) { _possessionsService = possessionsService ?? throw new ArgumentNullException(nameof(possessionsService)); _PilotService = pilotsService ?? throw new ArgumentNullException(nameof(pilotsService)); }
public TraineeshipController(ITraineeShipService TraineeshipService, IPilotsService PilotService) { this._TraineeshipService = TraineeshipService ?? throw new ArgumentNullException(nameof(TraineeShipService)); this._PilotService = PilotService ?? throw new ArgumentNullException(nameof(PilotsService)); }
public SubscriptionController(ISubscriptionService SubscriptionService, IPilotsService pilotsService) { this._SubscriptionService = SubscriptionService ?? throw new ArgumentNullException(nameof(SubscriptionService)); _pilotService = pilotsService ?? throw new ArgumentNullException(nameof(pilotsService)); }
public CrewsRemoteService(ICrewsService crewsService, IPilotsService pilotsService, IStewardessesService stewardessesService) { _crewsService = crewsService; _pilotsService = pilotsService; _stewardessesService = stewardessesService; }
public PilotsController(IPilotsService pilotsService, ILicensesService licensesService) { _pilotsService = pilotsService ?? throw new ArgumentNullException(nameof(pilotsService)); _licensesService = licensesService ?? throw new ArgumentNullException(nameof(licensesService)); }
public FlightsController(IFlightsService flightsService, IPilotsService pilotsService) { _flightsService = flightsService ?? throw new ArgumentNullException(nameof(flightsService)); _pilotsService = pilotsService ?? throw new ArgumentNullException(nameof(pilotsService)); }