You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1004 B
38 lines
1004 B
using Dto;
|
|
using Entities;
|
|
using Model;
|
|
|
|
namespace Shared.Mapper;
|
|
|
|
public static class BlackListMapper
|
|
{
|
|
public static BlackListDTO FromModelToDTO(this BlackList model)
|
|
{
|
|
return new BlackListDTO(model.Email, model.ExpirationDate);
|
|
}
|
|
|
|
public static BlackListDTO FromEntityToDTO(this BlackListEntity ent)
|
|
{
|
|
return new BlackListDTO(ent.Email, ent.ExpirationDate);
|
|
}
|
|
|
|
public static BlackList FromDTOToModel(this BlackListDTO dto)
|
|
{
|
|
return new BlackList(dto.Email, dto.ExpirationDate);
|
|
}
|
|
|
|
public static BlackList FromEntityToModel(this BlackListEntity ent)
|
|
{
|
|
return new BlackList(ent.Email, ent.ExpirationDate);
|
|
}
|
|
|
|
public static BlackListEntity FromDTOToEntity(this BlackListDTO dto)
|
|
{
|
|
return new BlackListEntity(dto.Email, dto.ExpirationDate);
|
|
}
|
|
|
|
public static BlackListEntity FromModelToEntity(this BlackList model)
|
|
{
|
|
return new BlackListEntity(model.Email, model.ExpirationDate);
|
|
}
|
|
} |