namespace MyOffice.Data.Repositories.Account; using Microsoft.EntityFrameworkCore; using Models.Accounts; public class AccountAccountCategoryRepository : AppRepository, IAccountAccountCategoryRepository { public List Get(Guid userId, Guid accountId, Guid categoryId) { return _context.AccountAccountCategories .Include(x => x.Account) .Include(x => x.Category) .Where(x => x.AccountId == accountId && x.CategoryId == categoryId && x.Category.UserId == userId) .ToList(); } public bool Remove(AccountAccountCategory accountAccountCategory) { return RemoveBase(accountAccountCategory) > 0; } public bool Add(AccountAccountCategory accountAccountCategory) { return AddBase(accountAccountCategory) > 0; } }