Hi,
I'm getting "InvalidCastException" (occurred in System.Data.Linq.dll) in my function:
public User GetUserByKey(Guid key)
{
return usersTable.FirstOrDefault(m => m.UserKey == key);
}
which is called here:
MembershipUser mu = Membership.CreateUser(user.UserName, user.Password, user.Email, null, null, true, Guid.NewGuid(), out status);
User new_user = _UsersRepository.GetUserByKey((Guid)mu.ProviderUserKey);
mu.ProviderUserKey is the Guid object encapsulated in general object type so everything should be fine :/
Thanks for your help!