hi.. i am getting this error at GridView1.DataBind();
Explicit construction of entity type 'WebApplication1.MUser' in query is not allowed.
using (var db = new UsersDataContext())
{
IEnumerable<MUser> user = from u in db.MUsers
where u.Id == 1
select new MUser {Username = u.Username, Id = u.Id, Password=u.Password, ProjectUsers=u.ProjectUsers };
GridView1.DataSource = user;
GridView1.DataBind();
}
how to solve this?
i am following this tutorial http://weblogs.asp.net/scottgu/archive/2007/04/21/new-orcas-language-feature-query-syntax.aspx