File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
exercise.wwwapi/DTOs/Posts/GetPosts Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ namespace exercise.wwwapi.DTOs.Posts.GetPosts
44{
55 public class CommentDTO
66 {
7+ public int Id { get ; set ; }
78 public string ? firstName { get ; set ; }
89 public string ? lastName { get ; set ; }
910 public string Body { get ; set ; } = string . Empty ;
@@ -13,6 +14,7 @@ public class CommentDTO
1314 public CommentDTO ( ) { }
1415 public CommentDTO ( Comment model )
1516 {
17+ Id = model . Id ;
1618 Body = model . Body ;
1719 CreatedAt = model . CreatedAt ;
1820 if ( model . User != null )
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ namespace exercise.wwwapi.DTOs.Posts.GetPosts
55{
66 public class PostDTO
77 {
8+ public int Id { get ; set ; }
89 public string Firstname { get ; set ; }
910 public string Lastname { get ; set ; }
1011 public string Body { get ; set ; } = string . Empty ;
@@ -17,6 +18,7 @@ public class PostDTO
1718 public PostDTO ( ) { }
1819 public PostDTO ( Post model )
1920 {
21+ Id = model . Id ;
2022 Firstname = model . Author . FirstName ;
2123 Lastname = model . Author . LastName ;
2224 Body = model . Body ;
You can’t perform that action at this time.
0 commit comments