BloggingSystem.Services.DataMappers.TagsMapper.ToModel C# (CSharp) 메소드

ToModel() 공개 정적인 메소드

public static ToModel ( Tag tagEntity ) : TagModel
tagEntity BloggingSystem.Models.Tag
리턴 BloggingSystem.DataTransferObjects.TagModel
        public static TagModel ToModel(Tag tagEntity)
        {
            TagModel tagModel = new TagModel()
            {
                ID = tagEntity.ID,
                Name = tagEntity.Name,
                PostsCount = tagEntity.Posts.Count
            };

            return tagModel;
        }
    }
TagsMapper