public IEnumerable <TEntity> getAll(string include = null) { if (string.IsNullOrEmpty(include)) { return(ctx.Set <TEntity>().ToList()); } else { return(ctx.Set <TEntity>().Include(include).ToList()); } }
public void Add(TEntity obj) { Db.Set <TEntity>().Add(obj); Db.SaveChanges(); }
public GenericRepository(Context.Context context) { _context = context; _dbSet = context.Set <TEntity>(); }
public GenericRepository(Context.Context context) { this.context = context; entity_ = context.Set <T>(); }
protected BaseRepository(Context.Context context) { _context = context; _dbSet = _context.Set <TEntity>(); }
public BaseRepository(Context.Context context) { Db = context; DbSet = context.Set <T>(); }
/// <summary> /// Método de busca de endereços /// </summary> /// <param name="personKey">Chave da pessoa</param> /// <returns>Listagem de endereços.</returns> public async Task <IEnumerable <Address> > Get(Guid personKey) { var addresses = await _context.Set <Address>().ToListAsync(); return(addresses.Where(a => a.PersonKey == personKey)); }
public BaseRepository(Context.Context context) : base(context) { Contexto = context; DbSet = Contexto.Set <T>(); }
public virtual IQueryable <TEntity> GetAll() { return(ctx.Set <TEntity>()); }
public Repository(Context.Context context) { Db = context; DbSet = Db.Set <TEntity>(); }
public ReadOnlyBaseRepository(Context.Context context) : base(context) { Context = context; DbSet = Context.Set <T>(); }
public CrudRepository(Context.Context context) { _context = context; _dbSet = context.Set <TEntity>(); }
public UserRepository(Context.Context context) { _db = context; _models = _db.Set <UserDomainModel>(); }
public BaseRepository(Context.Context context) { _context = context; _dataSet = _context.Set <T>(); }
public BaseRepository(Context.Context context) { this.context = context; _entity = context.Set <T>(); }
public ContaPagarRepository(Context.Context context) : base(context) { _dataset = context.Set <ContaPagarEntity>(); }
/// <summary> /// Método de listagem de pessoas. /// </summary> /// <returns>Listagem de pessoas.</returns> public async Task <IEnumerable <Person> > Get() { return(await _context.Set <Person>().ToListAsync()); }