TekH 5d29ad889d Refactor EGUser construction and add extension method
Removed constructors from EGUser class and introduced a new
static class EGUserExtensions with a ToEGUser extension method
to facilitate the conversion from User to EGUser. Updated
namespace imports to include DigitalData.UserManager.Domain.Entities.
2025-06-26 16:27:28 +02:00

30 lines
971 B
C#

using DigitalData.UserManager.Domain.Entities;
namespace EnvelopeGenerator.Domain.Entities
{
public static class EGUserExtensions
{
public static EGUser ToEGUser(this User user)
{
return new EGUser()
{
Id = user.Id,
Prename = user.Prename,
Name = user.Name,
Username = user.Username,
Shortname = user.Shortname,
Email = user.Email,
Language = user.Language,
Comment = user.Comment,
Deleted = user.Deleted,
DateFormat = user.DateFormat,
Active = user.Active,
GeneralViewer = user.GeneralViewer,
WanEnvironment = user.WanEnvironment,
UserIdFkIntEcm = user.UserIdFkIntEcm,
DeletedWhen = user.DeletedWhen,
DeletedWho = user.DeletedWho
};
}
}
}