survey-webapp/SurveyBackend/SurveyBackend.API/Mappers/AuthMapper.cs
2025-04-27 16:06:17 +05:00

23 lines
No EOL
647 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using SurveyBackend.Core.Models;
using SurveyBackend.DTOs;
namespace SurveyBackend.Mappers;
/// <summary>
/// Маппер всего связанного с авторизацией
/// </summary>
public static class AuthMapper
{
/// <summary>
/// Перегнать схему регистрации в нового юзера
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
public static User UserRegistrationToModel(UserRegistrationDto dto) => new User
{
Email = dto.Email,
FirstName = dto.FirstName,
LastName = dto.LastName,
Password = dto.Password,
};
}