public IUser GetByID(Guid userID)
 {
     IUser userFound = users.SingleOrDefault(user => user.ID == userID);
     if(userFound == null)
     {
         userFound = new NullUser();
     }
     return userFound;
 }
Example #2
0
        public IUser GetByID(Guid userID)
        {
            IUser userFound = users.SingleOrDefault(user => user.ID == userID);

            if (userFound == null)
            {
                userFound = new NullUser();
            }
            return(userFound);
        }
 public IUser GetByID(Guid userID)
 {
     //Contract.Ensures(Contract.Result<IUser>() != null);
     IUser userFound = users.SingleOrDefault(k => k.ID == userID);
     if (userFound == null)
     {
         userFound = new NullUser();
     }
     return userFound;
 }