Exemple #1
0
        public static PostResponse ConvertTo(DbPost dbPost)
        {
            if (dbPost == null)
            {
                return(null);
            }

            return(new PostResponse()
            {
                Name = dbPost.Name,
                Description = dbPost.Description
            });
        }
Exemple #2
0
        public static Post Convert(DbPost dbPost)
        {
            if (dbPost == null)
            {
                return(null);
            }

            return(new Post()
            {
                Id = dbPost.Id,
                Name = dbPost.Name,
                Description = dbPost.Description
            });
        }