Пример #1
0
        public async Task <bool> Delete(ServiceLocationReview entity)
        {
            try
            {
                _dbContext.ServiceLocationReviews.Remove(entity);
                await _dbContext.SaveChangesAsync();

                return(true);
            }
            catch (Exception e)
            {
                return(false);
            }
        }
Пример #2
0
        public async Task <int> Insert(ServiceLocationReview entity)
        {
            try
            {
                await _dbContext.ServiceLocationReviews.AddAsync(entity);

                await _dbContext.SaveChangesAsync();

                return(entity.ServiceLocationReviewId);
            }
            catch (Exception e)
            {
                return(0);
            }
        }