12345678910111213141516171819202122232425262728293031 |
- using Microsoft.EntityFrameworkCore;
- using MTWorkHR.Core.Entities;
- using MTWorkHR.Core.IDto;
- using MTWorkHR.Infrastructure.Entities;
- using MTWorkHR.Infrastructure.DBContext;
- using MTWorkHR.Core.IRepositories;
- namespace MTWorkHR.Infrastructure.Repositories
- {
- public class HubConnectionRepository : Repository<HubConnection>, IHubConnectionRepository
- {
- private readonly DbSet<HubConnection> dbSet;
- public HubConnectionRepository(HRDataContext context) : base(context)
- {
- dbSet = context.Set<HubConnection>();
- }
- public async Task<Tuple<IQueryable<HubConnection>, int>> GetAllAsync(string connectionId)
- {
- var query = dbSet.AsQueryable();
- var total = await query.CountAsync();
- return new Tuple<IQueryable<HubConnection>, int>(query, total);
- }
-
- }
- }
|