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.
37 lines
826 B
37 lines
826 B
using DTO;
|
|
using EntityFrameworkLOL.Entities;
|
|
using Model;
|
|
|
|
namespace APILOL.Mapper
|
|
{
|
|
public static class RunePageMapper
|
|
{
|
|
public static RunePageDTO ToDto(this RunePage runePage)
|
|
{
|
|
return new RunePageDTO()
|
|
{
|
|
Name = runePage.Name,
|
|
Runes = runePage.Runes
|
|
};
|
|
}
|
|
|
|
public static RunePage ToModel(this RunePageDTO runePage)
|
|
{
|
|
return new RunePage(runePage.Name);
|
|
}
|
|
|
|
public static RunePage ToModel(this RunePageEntity entity)
|
|
{
|
|
return new RunePage(entity.Name);
|
|
}
|
|
|
|
public static RunePageEntity ToEntity(this RunePage item)
|
|
{
|
|
return new RunePageEntity
|
|
{
|
|
Name = item.Name,
|
|
};
|
|
}
|
|
}
|
|
}
|