using Infrastructure; using Infrastructure.Repositories; using Server.Dto.Response; using Server.IServices; using AutoMapper; using Shared; namespace Server.Services; public class UsersService : IUsersService { private readonly OptifitDbContext _context; private readonly IUserRepository _userRepository; private readonly IMapper _mapper; public UsersService(OptifitDbContext context, IUserRepository userRepository, IMapper mapper) { _context = context; _userRepository = userRepository; _mapper = mapper; } public async Task GetUserById(string id) { var userEntity = await _userRepository.GetByIdAsync(id); if (userEntity == null) { return null; } var userDto = _mapper.Map(userEntity); return userDto; } public Task> GetUsers(int page, int size, bool ascending = true) { throw new NotImplementedException(); } }