i m getting an error
Error 1 Instance argument: cannot convert from 'System.Collections.Generic.IEnumerable<anonymoustype#1>' to 'System.Collections.Generic.IEnumerable<votingpanel2.web.vote>' C:\Users\Iram\Documents\Visual Studio 2008\Projects\VotingPanel2\VotingPanel2.Web\Service3.svc.cs 37 20 VotingPanel2.Web
Error 2 'System.Collections.Generic.IEnumerable<anonymoustype#1>' does not contain a definition for 'ToList' and the best extension method overload 'System.Linq.Enumerable.ToList<tsource>(System.Collections.Generic.IEnumerable<tsource>)' has some invalid arguments C:\Users\Iram\Documents\Visual Studio 2008\Projects\VotingPanel2\VotingPanel2.Web\Service3.svc.cs 37 20 VotingPanel2.Web
when i changed
public List<vote> GetChartData()<br />
{<br />
DataClasses1DataContext db = new DataClasses1DataContext();<br />
List<vote> votes = GetAllVote();<br />
<br />
var query =<br />
from c in votes<br />
select new { c.VotingText, VoteCount = c.VotingText.Count() };<br />
return query.ToList<vote>();<br />
<br />
<br />
}<br />
</vote></vote></vote>