PermissionRepository.cs 751 B

1234567891011121314151617181920212223242526272829
  1. using Microsoft.EntityFrameworkCore;
  2. using MTWorkHR.Core.Entities;
  3. using MTWorkHR.Core.IRepositories;
  4. using MTWorkHR.Infrastructure.DBContext;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10. namespace MTWorkHR.Infrastructure.Repositories
  11. {
  12. public class PermissionRepository : Repository<Permission>, IPermissionRepository
  13. {
  14. private readonly DbSet<Permission> dbSet;
  15. public PermissionRepository(HRDataContext _econtext) : base(_econtext)
  16. {
  17. dbSet = _context.Set<Permission>();
  18. }
  19. public async Task<List<Permission>> GetAllAsList()
  20. {
  21. return await dbSet.AsQueryable().ToListAsync();
  22. }
  23. }
  24. }