/// <summary> /// Build user. /// </summary> /// <param name="user">The user.</param> /// <param name="profile">The profile.</param> /// <returns></returns> internal static User Build(AdministrationSchema.User user, AdministrationSchema.UserProfile profile) { if (user != null) { user.UserProfile = profile; } return(Mapper.Map <AdministrationSchema.User, User>(user)); }
/// <summary> /// Build User. /// </summary> /// <param name="user">The user.</param> /// <param name="profile">The profile.</param> /// <param name="claims">The claim.</param> /// <returns></returns> internal static User Build(AdministrationSchema.User user, AdministrationSchema.UserProfile profile, IEnumerable <AdministrationSchema.UserClaim> claims) { var item = Build(user, profile); if (item != null) { item.Claims = Mapper.Map <IEnumerable <AdministrationSchema.UserClaim>, IEnumerable <UserClaim> >(claims).ToHashSet(); } return(item); }