mirror of
https://github.com/Govor-team/Govor.git
synced 2026-07-21 11:44:56 +00:00
568b09ba81
userValidotor has been added and tests are being developed
85 lines
1.9 KiB
C#
85 lines
1.9 KiB
C#
using Govor.Core.Infrastructure.Validators;
|
|
using Govor.Core.Models;
|
|
using Govor.Core.Repositories;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace Govor.Data.Repositories;
|
|
|
|
public class UsersRepository : IUsersRepository
|
|
{
|
|
private GovorDbContext _context;
|
|
private IObjectValidator<User> _validator;
|
|
public UsersRepository(GovorDbContext context, IObjectValidator<User> validator)
|
|
{
|
|
_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)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public Task<IEnumerable<User>> FindByRangeId(IEnumerable<Guid> ids)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public Task<User> FindByUsername(string username)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public Task<IEnumerable<User>> FindByRangeUsername(IEnumerable<string> usernames)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public Task<IEnumerable<User>> FindUsersByCreatedDate(DateOnly createdDate)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public Task Add(User user)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public Task Update(User user)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public Task Remove(User user)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public Task Remove(Guid userId)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public Task<bool> Exists(User user)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public Task<bool> ExistsById(Guid id)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public Task<bool> ExistsUsername(string username)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
} |