25 lines
No EOL
598 B
C#
25 lines
No EOL
598 B
C#
using SurveyBackend.Core.Models;
|
|
using SurveyBackend.Core.Repositories;
|
|
using SurveyBackend.Core.Services;
|
|
|
|
namespace SurveyBackend.Services.Services;
|
|
|
|
public class UserService : IUserService
|
|
{
|
|
private readonly IUserRepository _userRepository;
|
|
|
|
public UserService(IUserRepository userRepository)
|
|
{
|
|
_userRepository = userRepository;
|
|
}
|
|
|
|
public async Task<User?> GetUserByEmail(string email)
|
|
{
|
|
return await _userRepository.GetUserByEmail(email);
|
|
}
|
|
|
|
public async Task CreateUserAsync(User user)
|
|
{
|
|
await _userRepository.AddAsync(user);
|
|
}
|
|
} |