Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. public abstract class BaseRepository<TEntity>
  2. {
  3. protected DbContext context;
  4.  
  5. protected BaseRepository(MyDbContext context)
  6. {
  7. this.context = context;
  8. }
  9.  
  10. public List<TEntity> GetAll()
  11. {
  12. return context.Set<TEntity>().ToList();
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement