private async Task ValidateStoreAsync(int storeId)
        {
            var store = await repository.GetStoreAsync(storeId, false);

            if (store == null)
            {
                throw new NotFoundException($"The Store with the Id: {storeId} doesn't exist");
            }
        }
예제 #2
0
        public async Task <StoreModel> GetStoreAsync(int id, bool showInstruments = false)
        {
            var store = await repository.GetStoreAsync(id, showInstruments);

            if (store == null)
            {
                throw new NotFoundException($"The Store with the Id: {id} doesn't exist");
            }
            else
            {
                return(mapper.Map <StoreModel>(store));
            }
        }