Server Error in '/' Application.

Count must have a non-negative value.
Parameter name: count

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: Count must have a non-negative value.
Parameter name: count

Source Error:


Line 94:                                  select c).Distinct().Count();
Line 95: 
Line 96:         var contents = (from c in DB.Icerikler
Line 97:                         join ct in DB.IcerikEtiketleri on c.IcerikID equals ct.IcerikID into temp
Line 98:                         from t in temp.DefaultIfEmpty()

Source File: c:\Web Sites\SG\www.semgoksu.com\Blog\Default.aspx.cs    Line: 96

Stack Trace:


[ArgumentException: Count must have a non-negative value.
Parameter name: count]
   System.Data.Entity.Core.Common.CommandTrees.ExpressionBuilder.DbExpressionBuilder.Skip(DbExpressionBinding input, IEnumerable`1 sortOrder, DbExpression count) +581
   System.Data.Entity.Core.Objects.ELinq.ExpressionConverter.Skip(DbExpressionBinding input, DbExpression skipCount) +34
   System.Data.Entity.Core.Objects.ELinq.PagingTranslator.TranslateUnary(ExpressionConverter parent, DbExpression operand, MethodCallExpression call) +91
   System.Data.Entity.Core.Objects.ELinq.MethodCallTranslator.TypedTranslate(ExpressionConverter parent, MethodCallExpression linq) +135
   System.Data.Entity.Core.Objects.ELinq.ExpressionConverter.TranslateExpression(Expression linq) +141
   System.Data.Entity.Core.Objects.ELinq.UnarySequenceMethodTranslator.Translate(ExpressionConverter parent, MethodCallExpression call) +154
   System.Data.Entity.Core.Objects.ELinq.MethodCallTranslator.TypedTranslate(ExpressionConverter parent, MethodCallExpression linq) +135
   System.Data.Entity.Core.Objects.ELinq.ExpressionConverter.TranslateExpression(Expression linq) +141
   System.Data.Entity.Core.Objects.ELinq.ExpressionConverter.Convert() +21
   System.Data.Entity.Core.Objects.ELinq.ELinqQueryState.GetExecutionPlan(Nullable`1 forMergeOption) +295
   System.Data.Entity.Core.Objects.<>c__DisplayClass7.<GetResults>b__6() +38
   System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction(Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) +462
   System.Data.Entity.Core.Objects.<>c__DisplayClass7.<GetResults>b__5() +203
   System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute(Func`1 operation) +234
   System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption) +357
   System.Data.Entity.Core.Objects.ObjectQuery`1.<System.Collections.Generic.IEnumerable<T>.GetEnumerator>b__0() +30
   System.Data.Entity.Internal.LazyEnumerator`1.MoveNext() +39
   System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +453
   System.Linq.Enumerable.ToList(IEnumerable`1 source) +73
   Blog_Default.IcerikleriGetir() in c:\Web Sites\SG\www.semgoksu.com\Blog\Default.aspx.cs:96
   Blog_Default.SayfayiHazirla() in c:\Web Sites\SG\www.semgoksu.com\Blog\Default.aspx.cs:80
   Blog_Default.Page_Load(Object sender, EventArgs e) in c:\Web Sites\SG\www.semgoksu.com\Blog\Default.aspx.cs:74
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4700.0