using Apimanager_backend.Data; using Apimanager_backend.Models; using Microsoft.EntityFrameworkCore; namespace Apimanager_backend.Services { public class UserPackageService : IUserPackageService { private ApiContext _context; public UserPackageService(ApiContext apiContext) { _context = apiContext; } public async Task> GetUserPackagesByUserIdAsync(int userId) { IQueryable query = _context.UserPackages.Include(x => x.Package).Where(x => x.UserId == userId); return await query.ToListAsync(); } } }