Add project files
This commit is contained in:
13
T120B165-ImgBoard/Dtos/Comment/CommentDto.cs
Normal file
13
T120B165-ImgBoard/Dtos/Comment/CommentDto.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace T120B165_ImgBoard.Dtos.Comment;
|
||||
|
||||
public record CommentDto(int Id, string Text, SlimUserDto Author)
|
||||
{
|
||||
public static CommentDto FromComment(Models.Comment comment)
|
||||
{
|
||||
return new CommentDto(
|
||||
Id: comment.Id,
|
||||
Text: comment.Text,
|
||||
Author: SlimUserDto.FromUser(comment.Author)
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user