public async Task <Order> Add(Order entity)
        {
            await _repository.AddAsync(entity);

            _repository.SaveChanges();
            return(entity);
        }
Пример #2
0
        public async Task <Restaurant> Add(Restaurant entity)
        {
            await _repository.AddAsync(entity);

            _repository.SaveChanges();
            return(entity);
        }
Пример #3
0
        public async Task <MenuItem> Add(MenuItem entity)
        {
            await _repository.AddAsync(entity);

            _repository.SaveChanges();
            return(entity);
        }
Пример #4
0
        private async Task InsertCategoryAsync(CategoryDto category)
        {
            var categoryDomain = _mapper.Map <Category>(category);

            await _context.AddAsync(categoryDomain);
        }