public async Task <TEntity> AddAsync(TEntity entity)
        {
            if (entity == null)
            {
                throw new ArgumentNullException($"{nameof(AddAsync)} entity must not be null");
            }

            try
            {
                entity.UniqueId    = Guid.NewGuid();
                entity.CreatedDate = System.DateTime.Now;
                entity.IsActive    = true;
                entity.IsDeleted   = false;

                await _repositoryPatternPaymentContext.AddAsync(entity);

                await _repositoryPatternPaymentContext.SaveChangesAsync();

                return(entity);
            }
            catch (Exception ex)
            {
                throw new Exception($"{nameof(entity)} could not be saved: {ex.Message}");
            }
        }
        public async Task <TEntity> Create(TEntity entity)
        {
            var value = await _dbContext.Set <TEntity>().AddAsync(entity);

            await _dbContext.SaveChangesAsync();

            return(value.Entity);
        }