public static PostResponse ConvertTo(DbPost dbPost) { if (dbPost == null) { return(null); } return(new PostResponse() { Name = dbPost.Name, Description = dbPost.Description }); }
public static Post Convert(DbPost dbPost) { if (dbPost == null) { return(null); } return(new Post() { Id = dbPost.Id, Name = dbPost.Name, Description = dbPost.Description }); }