update
This commit is contained in:
@@ -90,4 +90,12 @@ public class AccountRepository : AppRepository<Account>, IAccountRepository
|
||||
{
|
||||
return RemoveBase(account) > 0;
|
||||
}
|
||||
|
||||
public List<Account> FindAccounts(Guid userId, string term)
|
||||
{
|
||||
return _context.Accounts
|
||||
.Where(x => x.AccessRights.Any(a => a.UserId == userId))
|
||||
.Where(x => x.Name.Contains(term))
|
||||
.ToList();
|
||||
}
|
||||
}
|
||||
@@ -12,4 +12,5 @@ public interface IAccountRepository
|
||||
Account? Get(Guid userId, Guid id);
|
||||
bool Update(Account account);
|
||||
bool Remove(Account account);
|
||||
List<Account> FindAccounts(Guid userId, string term);
|
||||
}
|
||||
Reference in New Issue
Block a user