score:0

Accepted answer
ienumerable<customer> name()   
{
    using (adventureworksltdatacontext db = new adventureworksltdatacontext())
    {
        var query= db.customers.select(c => new customerview { firstname = c.firstname, lastname = c.lastname }).tolist();
        //cast it back to customer
        return (query.cast<customer>())
    }
}

Related Query

More Query from same tag