예제 #1
0
        private Bicycle BikeExistsById(int id)
        {
            var bike = _bicycleRepository.GetById(id);

            if (bike == null)
            {
                throw new ArgumentException($"Bike with id {id} does not exists");
            }
            return(bike);
        }
예제 #2
0
 public async Task <Bicycle> GetById(Guid id)
 {
     return(await bicycleRepository.GetById(id));
 }