public async Task <T> AddAsync(T entity) { await _DBContext.Set <T>().AddAsync(entity); await _DBContext.SaveChangesAsync(); return(entity); }
public DataRepository() { moviecontext = new MovieDBContext(); DbSet = moviecontext.Set <T>(); }
public GenericRepository(MovieDBContext dbContext) { _dbContext = dbContext; _dbSet = _dbContext.Set <T>(); }
public GenericRepository(MovieDBContext context) { _context = context; _dbSet = _context.Set <TEntity>(); }
public AddressRepository(MovieDBContext dbContext) { _dbContext = dbContext; _dbSet = _dbContext.Set <T>(); }