예제 #1
0
 /// <summary>
 /// Updates the specified user.
 /// </summary>
 /// <param name="iUser">The iuser.</param>
 /// <param name="user">The user.</param>
 /// <returns>The same user reference, but updated.</returns>
 public static Entites.User Update(IUser iUser, Entites.User user)
 {
     DAL.User.LoadUserNames(user);
     Entites.UserName userName = UserName.ExtractUserName(iUser, user);
     if (user.UserNames.All(x => x.ToString() != userName.ToString()))
     {
         UserName.UpdateUserName(userName);
     }
     return(user);
 }
예제 #2
0
 /// <summary>
 /// Updates the specified channel.
 /// </summary>
 /// <param name="iChannel">The ichannel to take the information from.</param>
 /// <param name="channel">The channel to update.</param>
 /// <returns>The second arguement, but updated.</returns>
 public static Entites.Channel Update(IChannel iChannel, Entites.Channel channel)
 {
     DAL.Channel.LoadUserNames(channel);
     Entites.UserName userName = UserName.ExtractUserName(iChannel, channel);
     if (channel.UserNames.All(x => x.ToString() != userName.ToString()))
     {
         UserName.UpdateUserName(userName);
     }
     return(channel);
 }