Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public abstract class BaseRepository<TEntity>
- {
- protected DbContext context;
- protected BaseRepository(MyDbContext context)
- {
- this.context = context;
- }
- public List<TEntity> GetAll()
- {
- return context.Set<TEntity>().ToList();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement