I'm working on the UsersRepository

userValidotor has been added and tests are being developed
This commit is contained in:
Artemy
2025-06-17 11:57:57 +07:00
parent 5747f26421
commit 568b09ba81
12 changed files with 180 additions and 25 deletions
+15 -2
View File
@@ -1,13 +1,26 @@
using Govor.Core.Infrastructure.Validators;
using Govor.Core.Models;
using Govor.Core.Repositories;
using Microsoft.EntityFrameworkCore;
namespace Govor.Data.Repositories;
public class UsersRepository : IUsersRepository
{
public Task<IEnumerable<User>> GetAll()
private GovorDbContext _context;
private IObjectValidator<User> _validator;
public UsersRepository(GovorDbContext context, IObjectValidator<User> validator)
{
throw new NotImplementedException();
_context = context;
_validator = validator;
}
public async Task<IEnumerable<User>> GetAll()
{
return await _context.Users
.AsNoTracking()
.Where(x => true)
.ToListAsync();
}
public Task<User> FindById(Guid id)