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.
30 lines
675 B
30 lines
675 B
using DataBase.Entity;
|
|
using DTO;
|
|
|
|
namespace ApiLeapHit.Mapper
|
|
{
|
|
public static class ChatMapper
|
|
{
|
|
public static DTOChat ToDto(this Chat chat)
|
|
{
|
|
DTOChat dtoChat = new DTOChat()
|
|
{
|
|
chatId = chat.chatId,
|
|
PlayerId1 = chat.player1,
|
|
PlayerId2 = chat.player2
|
|
};
|
|
return dtoChat;
|
|
}
|
|
|
|
public static Chat ToChat(this DTOChat dtoChat)
|
|
{
|
|
return new Chat
|
|
{
|
|
chatId = dtoChat.chatId,
|
|
player1 = dtoChat.PlayerId1,
|
|
player2 = dtoChat.PlayerId2
|
|
};
|
|
}
|
|
}
|
|
}
|