public async Task <IActionResult> Staff()
        {
            try
            {
                var staff = await _bikeStoreRepository.GetStaff();

                return(Ok(staff));
            }
            catch (Exception ex)
            {
                this._logger.LogError(ex, ex.Message);
                return(new StatusCodeResult(Status500InternalServerError));
            }
        }
Example #2
0
        public SalesQuery(IBikeStoreRepository bikeStoreRepository)
        {
            Field <ListGraphType <StaffType> >(
                "staff",
                resolve: context =>
            {
                return(bikeStoreRepository.GetStaff());
            });

            Field <ListGraphType <StoreType> >(
                "stores",
                resolve: context =>
            {
                return(bikeStoreRepository.GetStores());
            });
        }