mirror of
https://github.com/GCMatters/hermes.git
synced 2026-02-04 21:50:12 +01:00
34 lines
867 B
C#
34 lines
867 B
C#
using WebApp.DTOs;
|
|
using WebApp.Entities;
|
|
|
|
namespace WebApp.Mapping
|
|
{
|
|
public static class UserMapping
|
|
{
|
|
public static UserSummaryDto ToUserSummaryDto(this User user)
|
|
{
|
|
return new UserSummaryDto(
|
|
user.UserId,
|
|
user.Email,
|
|
user.FirstName,
|
|
user.LastName,
|
|
user.CreatedAt,
|
|
user.IsOrganisation
|
|
);
|
|
}
|
|
|
|
public static UserSummaryWithOrgIdDto ToUserSummaryWithOrgIdDto(this User user, int OrganisationId)
|
|
{
|
|
return new UserSummaryWithOrgIdDto(
|
|
user.UserId,
|
|
user.Email,
|
|
user.FirstName,
|
|
user.LastName,
|
|
user.CreatedAt,
|
|
user.IsOrganisation,
|
|
OrganisationId
|
|
);
|
|
}
|
|
}
|
|
}
|