public GaragesController(GarageContext db, GarageRepository repository, UserManager <Manager> userManager) { _db = db; _repository = repository; _userManager = userManager; }
public IEnumerable <GarageModel> Get() { GarageRepository garageRepository = new GarageRepository(); return(garageRepository.BusInGarage().ToList().Select(x => new GarageModel { BusId = x.buszId.Value })); }
public GarageITron() { InitializeComponent(); _repo = GarageRepository.Instance; _mediator = new GarageMediator.GarageMediator(); _mediator.IDScanned += _mediator_IDScanned; _mediator.VehicleInstructionsStarted += _mediator_VehicleInstructionsStarted; _mediator.VehicleProcessingStarted += _mediator_VehicleProcessingStarted; _mediator.VehicleProcessed += _mediator_VehicleProcessed; }
static void Main(string[] args) { GarageAssignment assignment = GarageRepository.GetGarageAssignment("39009D3D68"); Console.WriteLine($"{assignment.ID} {assignment.Stored} {assignment.Tier} {assignment.Cell}"); GarageRepository.MoveVehicle("39009D3D68", false); assignment = GarageRepository.GetGarageAssignment("39009D3D68"); Console.WriteLine($"{assignment.ID} {assignment.Stored} {assignment.Tier} {assignment.Cell}"); Console.ReadKey(); }
public IEnumerable <DriverModel> Get(int id) { GarageRepository garageRepository = new GarageRepository(); return(busRepository.GetAllDrivers().Where(g => g.soforId == id).ToList().Select(x => new DriverModel { Id = x.soforId, DriverName = x.soforNev.ToString(), DriverPassword = x.soforJelszo.ToString() })); }
public GarageSaleTO GetGarageyByID(Guid id) { try { IGarageRepository repo = new GarageRepository(this.UserId); return(repo.GetGarageyByID(id)); } catch (Exception ex) { throw new GarageSaleException("GarageSaleGetGarageyByIDError", ex); } }
public bool Update(GarageSaleTO branch) { try { IGarageRepository repo = new GarageRepository(this.UserId); return(repo.Update(branch)); } catch (Exception ex) { throw new GarageSaleException("GarageSaleUpdateError", ex); } }
public bool Delete(Guid branchId) { try { IGarageRepository repo = new GarageRepository(this.UserId); return(repo.Delete(branchId)); } catch (Exception ex) { throw new GarageSaleException("GarageSaleDeleteError", ex); } }
public bool Add(GarageSaleTO newBranch) { try { IGarageRepository repo = new GarageRepository(this.UserId); return(repo.Add(newBranch)); } catch (Exception ex) { throw new GarageSaleException("GarageSaleAddError", ex); } }
public IList <GarageSaleTO> GetByUserID(string userId) { IList <GarageSaleTO> result = new List <GarageSaleTO>(); try { IGarageRepository repo = new GarageRepository(this.UserId); result = repo.GetByUserID(userId); } catch (Exception ex) { throw new GarageSaleException("GarageSaleGetByUserIDError", ex); } return(result); }
public GaragesController() { _garage = new GarageRepository(); }
public GarageController() { repo = new GarageRepository(); }
public GarageHandlersTests(QueryTestFixture fixture) { _context = fixture.Context; garageRepository = new GarageRepository(_context); }
public HomeController() { this.db = new GRepo(); }
public HomeController(GarageRepository repo) { this.db = repo; }