Błąd serwera w aplikacji '/'.

Nie można utworzyć wartości stałej typu „RevitalizationModels.DTO.Module”. W tym kontekście są obsługiwane tylko typy pierwotne i typy wyliczeń.

Opis: Podczas wykonywania bieżącego żądania sieci Web wystąpił nieobsługiwany wyjątek. Aby uzyskać dodatkowe informacje o błędzie i miejscu jego występowania w kodzie, przejrzyj ślad stosu.

Szczegóły wyjątku: System.NotSupportedException: Nie można utworzyć wartości stałej typu „RevitalizationModels.DTO.Module”. W tym kontekście są obsługiwane tylko typy pierwotne i typy wyliczeń.

Błąd źródła:

Podczas wykonywania bieżącego żądania sieci Web został wygenerowany nieobsługiwany wyjątek. Informacje dotyczące pochodzenia i lokalizacji wyjątku można zidentyfikować przy użyciu poniższego śladu stosu wyjątku.

Ślad stosu:


[NotSupportedException: Nie można utworzyć wartości stałej typu „RevitalizationModels.DTO.Module”. W tym kontekście są obsługiwane tylko typy pierwotne i typy wyliczeń.]
   System.Data.Objects.ELinq.ConstantTranslator.TypedTranslate(ExpressionConverter parent, ConstantExpression linq) +11594874
   System.Data.Objects.ELinq.ExpressionConverter.TranslateExpression(Expression linq) +370
   System.Linq.WhereSelectEnumerableIterator`2.MoveNext() +248
   System.Data.Common.CommandTrees.ExpressionBuilder.Internal.EnumerableValidator`3.Validate(IEnumerable`1 argument, String argumentName, Int32 expectedElementCount, Boolean allowEmpty, Func`3 map, Func`2 collect, Func`3 deriveName) +759
   System.Data.Common.CommandTrees.ExpressionBuilder.Internal.ArgumentValidation.CreateExpressionList(IEnumerable`1 arguments, String argumentName, Boolean allowEmpty, Action`2 validationCallback) +295
   System.Data.Common.CommandTrees.ExpressionBuilder.DbExpressionBuilder.CreateNewCollection(IEnumerable`1 elements) +103
   System.Data.Objects.ELinq.NewArrayInitTranslator.TypedTranslate(ExpressionConverter parent, NewArrayExpression linq) +467
   System.Data.Objects.ELinq.ExpressionConverter.TranslateExpression(Expression linq) +370
   System.Data.Objects.ELinq.ConstantTranslator.TypedTranslate(ExpressionConverter parent, ConstantExpression linq) +583
   System.Data.Objects.ELinq.ExpressionConverter.TranslateExpression(Expression linq) +370
   System.Data.Objects.ELinq.OneLambdaTranslator.Translate(ExpressionConverter parent, MethodCallExpression call, DbExpression& source, DbExpressionBinding& sourceBinding, DbExpression& lambda) +85
   System.Data.Objects.ELinq.OneLambdaTranslator.Translate(ExpressionConverter parent, MethodCallExpression call) +61
   System.Data.Objects.ELinq.MethodCallTranslator.TypedTranslate(ExpressionConverter parent, MethodCallExpression linq) +220
   System.Data.Objects.ELinq.ExpressionConverter.TranslateExpression(Expression linq) +370
   System.Data.Objects.ELinq.UnarySequenceMethodTranslator.Translate(ExpressionConverter parent, MethodCallExpression call) +159
   System.Data.Objects.ELinq.MethodCallTranslator.TypedTranslate(ExpressionConverter parent, MethodCallExpression linq) +220
   System.Data.Objects.ELinq.MemberAccessTranslator.TypedTranslate(ExpressionConverter parent, MemberExpression linq) +226
   System.Data.Objects.ELinq.ExpressionConverter.TranslateExpression(Expression linq) +370
   System.Data.Objects.ELinq.MemberInitTranslator.TypedTranslate(ExpressionConverter parent, MemberInitExpression linq) +429
   System.Data.Objects.ELinq.ExpressionConverter.TranslateExpression(Expression linq) +370
   System.Data.Objects.ELinq.MemberInitTranslator.TypedTranslate(ExpressionConverter parent, MemberInitExpression linq) +429
   System.Data.Objects.ELinq.ExpressionConverter.TranslateExpression(Expression linq) +370
   System.Data.Objects.ELinq.MemberInitTranslator.TypedTranslate(ExpressionConverter parent, MemberInitExpression linq) +429
   System.Data.Objects.ELinq.ExpressionConverter.TranslateExpression(Expression linq) +370
   System.Data.Objects.ELinq.ExpressionConverter.TranslateLambda(LambdaExpression lambda, DbExpression input) +172
   System.Data.Objects.ELinq.SelectTranslator.Translate(ExpressionConverter parent, MethodCallExpression call) +179
   System.Data.Objects.ELinq.MethodCallTranslator.TypedTranslate(ExpressionConverter parent, MethodCallExpression linq) +220
   System.Data.Objects.ELinq.ExpressionConverter.TranslateExpression(Expression linq) +370
   System.Data.Objects.ELinq.GroupByTranslator.Translate(ExpressionConverter parent, MethodCallExpression call, SequenceMethod sequenceMethod) +132
   System.Data.Objects.ELinq.MethodCallTranslator.TypedTranslate(ExpressionConverter parent, MethodCallExpression linq) +220
   System.Data.Objects.ELinq.ExpressionConverter.TranslateExpression(Expression linq) +370
   System.Data.Objects.ELinq.OneLambdaTranslator.Translate(ExpressionConverter parent, MethodCallExpression call, DbExpression& source, DbExpressionBinding& sourceBinding, DbExpression& lambda) +85
   System.Data.Objects.ELinq.OneLambdaTranslator.Translate(ExpressionConverter parent, MethodCallExpression call) +61
   System.Data.Objects.ELinq.MethodCallTranslator.TypedTranslate(ExpressionConverter parent, MethodCallExpression linq) +220
   System.Data.Objects.ELinq.ExpressionConverter.TranslateExpression(Expression linq) +370
   System.Data.Objects.ELinq.ThenByTranslatorBase.Translate(ExpressionConverter parent, MethodCallExpression call) +80
   System.Data.Objects.ELinq.MethodCallTranslator.TypedTranslate(ExpressionConverter parent, MethodCallExpression linq) +220
   System.Data.Objects.ELinq.ExpressionConverter.TranslateExpression(Expression linq) +370
   System.Data.Objects.ELinq.SelectTranslator.Translate(ExpressionConverter parent, MethodCallExpression call) +101
   System.Data.Objects.ELinq.MethodCallTranslator.TypedTranslate(ExpressionConverter parent, MethodCallExpression linq) +220
   System.Data.Objects.ELinq.ExpressionConverter.Convert() +155
   System.Data.Objects.ELinq.ELinqQueryState.GetExecutionPlan(Nullable`1 forMergeOption) +350
   System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption) +10679213
   System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator() +51
   System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +446
   System.Linq.Enumerable.ToList(IEnumerable`1 source) +80
   RevitalizationModels.Controllers.HomeController.Page(String SiteLanguage, String name) in C:\svn\trunk\RevitalizationModels\RevitalizationModels\Controllers\HomeController.cs:246
   lambda_method(Closure , ControllerBase , Object[] ) +179
   System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +274
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +39
   System.Web.Mvc.Async.<>c__DisplayClass39.<BeginInvokeActionMethodWithFilters>b__33() +120
   System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +452
   System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +452
   System.Web.Mvc.Async.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49() +452
   System.Web.Mvc.Async.<>c__DisplayClass37.<BeginInvokeActionMethodWithFilters>b__36(IAsyncResult asyncResult) +15
   System.Web.Mvc.Async.<>c__DisplayClass2a.<BeginInvokeAction>b__20() +33
   System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +240
   System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +28
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +74
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15
   System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +42
   System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +606
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +288


Informacje o wersji: Wersja Microsoft .NET Framework:4.0.30319; Wersja ASP.NET:4.0.30319.34248