public UserLevelDTO(UserLevel level) { Level = level.Level; XP = level.XP; Category = CategoryDTO.FromEntity(level.Category); Obtained = level.Obtained; UserID = level.UserID; Badges = level.UserBadges.Select(UserBadgeDTO.FromEntity).ToList(); }
public static UserLevelDTO FromEntity(UserLevel level) { return(new UserLevelDTO(level)); }