Is there any difference at all between this:
dataContext.People.Select(ø => new
{
Name = ø.Name,
});
and this:
dataContext.People.Select(ø => new
{
ø.Name,
});
?
Is there any difference at all between this:
dataContext.People.Select(ø => new
{
Name = ø.Name,
});
and this:
dataContext.People.Select(ø => new
{
ø.Name,
});
?
They are identical; if no name is specified (and the right-hand-side is a simple member-access) then the name of the existing member is assumed. The name is only necessary to:
Name = grp.Key
)Count = grp.Count()
)No. The second simply derives the name of the property for you, the actual code generated is the same.
No, the compiler will name the property of the anonymous type the same as the right hand side of the assignment.