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, IHubConnectionRepository { private readonly DbSet dbSet; public HubConnectionRepository(HRDataContext context) : base(context) { dbSet = context.Set(); } public async Task, int>> GetAllAsync(string connectionId) { var query = dbSet.AsQueryable(); var total = await query.CountAsync(); return new Tuple, int>(query, total); } } }