"select new " not working?
Posted: Tue 28 Jul 2009 23:33
Purchased postgres data connector and have a linq to pgsql model.
i have a simple query:
and the class is defined like this:
On runtime this crashes with the error: The operation would destabilize the runtime.
With the Microsoft Linq to sql tools we do not have this problem, don't get why this wouldn't work.
Does your software not support the "select new .." query function?
i have a simple query:
Code: Select all
var members = from m in dc.Members
where m.IsActive == true
select new aspnet_User
{
UserId = m.UserLoginId,
....
}
Code: Select all
public class aspnet_User
{
public int UserId { get; set; }
public string UserName { get; set; }
public string LoweredUserName { get; set; }
public System.Nullable LastActivityDate { get; set; }
public string Password { get; set; }
public System.Nullable PasswordFormat { get; set; }
public string PasswordSalt { get; set; }
public string Email { get; set; }
public string LoweredEmail { get; set; }
public string PasswordQuestion { get; set; }
public string PasswordAnswer { get; set; }
public bool IsApproved { get; set; }
public bool IsLockedOut { get; set; }
public System.Nullable CreationDate { get; set; }
public System.Nullable LastLoginDate { get; set; }
public System.Nullable MustChangePassword { get; set; }
public System.Nullable LastPasswordChangedDate { get; set; }
public System.Nullable LastLockoutDate { get; set; }
}
With the Microsoft Linq to sql tools we do not have this problem, don't get why this wouldn't work.
Does your software not support the "select new .." query function?