Click here to Skip to main content
15,888,521 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hello, i have a community class where i want each user to view his communities and when he clicks on each one he will see the following details but i don't seem to be able to use linq to customise the edit view. Below, is what i have tried:
C#
 public ActionResult Details(int? Id)
{
var spc = (from d in db.communities.find(id)
where d.profile.username == User.identity.Name
select new community()
{name = d.name,
summary = d.summary,
NumberCommunity = d.communities.Count
});
return view(db.communities.ToList());
}
Posted
Updated 4-May-15 9:03am
v2
Comments
Suvendu Shekhar Giri 4-May-15 15:05pm    
Any other laguage you forgot to tag?
[no name] 4-May-15 16:14pm    
Not following. As in?
ZurdoDev 4-May-15 16:58pm    
1. Reply to the comment so that the user is notified.
2. You have this tagged as C++, VB, C#, etc, etc. when it looks to be C#. Please remove the unrelated tags.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900