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

            return(new PostResponse()
            {
                Name = dbPost.Name,
                Description = dbPost.Description
            });
        }
Example #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
            });
        }