Solution to the problem
Firstly, thank you all for your suggestions. I followed each sentence again and again until I found a problem. This is what was wrong, and perhaps someone can clarify to others.
VS2010 Performance Wizard , , PartialViews, , , , , .
foreach (ProfileComment item in Model)
{
Html.RenderPartial("UserActivityComment", item);
}
...
Friends friend = Model.Friends.Where(e => e.ID == activity.ActionID).FirstOrDefault();
if (friend.FriendsProfile.UserName != Page.User.Identity.Name)
{
Html.RenderPartial("UserActivityFriend.ascx", friend);
}
ProfileComment Friends ( ) ViewModel, . VM Entity Framework 0,3 . , VM.
, , . "for" , FirstOrDefault Performace.
, , . :
_entities.Friends.MergeOption = MergeOption.NoTracking;
_entities.ProfileComment.MergeOption = MergeOption.NoTracking;
, , .
Aia Research
blogs.microsoft.co.il/blogs/gilf/archive/2009/02/20/disabling-change-tracking-in-entity-framework.aspx
, . Btw !