It was the project reference that had gone missing but now there are other errors.
Line 40: BeginContext("~/Litium/App/Views/App/Headers.cshtml", 1, 5, false);
Line 41:
Line 42: Write(model);
Line 43:
Line 44: EndContext("~/Litium/App/Views/App/Headers.cshtml", 1, 5, false);
The SqlParameter is already contained by another SqlParameterCollection.
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: The SqlParameter is already contained by another SqlParameterCollection.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[ArgumentException: The SqlParameter is already contained by another SqlParameterCollection.] System.Data.SqlClient.SqlParameterCollection.Validate(Int32 index, Object value) +477 System.Data.SqlClient.SqlParameterCollection.Add(Object value) +44 Microsoft.EntityFrameworkCore.Storage.Internal.DynamicRelationalParameter.AddDbParameter(DbCommand command, Object value) +229 Microsoft.EntityFrameworkCore.Storage.Internal.RelationalParameterBase.AddDbParameter(DbCommand command, IReadOnlyDictionary
2 parameterValues) +149
Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.CreateCommand(IRelationalConnection connection, IReadOnlyDictionary2 parameterValues) +399 Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary
2 parameterValues) +116
Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteReader(IRelationalConnection connection, IReadOnlyDictionary2 parameterValues) +65 Microsoft.EntityFrameworkCore.Query.Internal.Enumerator.BufferlessMoveNext(DbContext _, Boolean buffer) +582 Microsoft.EntityFrameworkCore.Query.Internal.Enumerator.MoveNext() +160 Microsoft.EntityFrameworkCore.Query.Internal.QueryBuffer.IncludeCollection(Int32 includeId, INavigation navigation, INavigation inverseNavigation, IEntityType targetEntityType, IClrCollectionAccessor clrCollectionAccessor, IClrPropertySetter inverseClrPropertySetter, Boolean tracking, TEntity entity, Func
1 relatedEntitiesFactory, Func3 joinPredicate) +240 lambda_method(Closure , QueryContext , ChannelToCountryLinkEntity , Object[] ) +883 Microsoft.EntityFrameworkCore.Query.Internal.IncludeCompiler._Include(QueryContext queryContext, TEntity entity, Object[] included, Action
3 fixup) +31
lambda_method(Closure , QueryContext , ChannelToCountryLinkEntity ) +296
Microsoft.EntityFrameworkCore.Query.ExpressionVisitors.Internal.TypedProjectionShaper3.Shape(QueryContext queryContext, ValueBuffer& valueBuffer) +141 Microsoft.EntityFrameworkCore.Query.Internal.Enumerator.BufferlessMoveNext(DbContext _, Boolean buffer) +475 Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.ExecuteImplementation(Func
3 operation, Func3 verifySucceeded, TState state) +694 Microsoft.EntityFrameworkCore.Query.Internal.Enumerator.MoveNext() +160 Microsoft.EntityFrameworkCore.Query.Internal.QueryBuffer.IncludeCollection(Int32 includeId, INavigation navigation, INavigation inverseNavigation, IEntityType targetEntityType, IClrCollectionAccessor clrCollectionAccessor, IClrPropertySetter inverseClrPropertySetter, Boolean tracking, TEntity entity, Func
1 relatedEntitiesFactory, Func3 joinPredicate) +240 lambda_method(Closure , QueryContext , ChannelEntity , Object[] ) +2508 Microsoft.EntityFrameworkCore.Query.Internal.IncludeCompiler._Include(QueryContext queryContext, TEntity entity, Object[] included, Action
3 fixup) +31
lambda_method(Closure , ChannelEntity ) +346
System.Linq.WhereSelectEnumerableIterator2.MoveNext() +238 Microsoft.EntityFrameworkCore.Query.Internal.EnumeratorExceptionInterceptor.MoveNext() +264 System.Collections.Generic.List
1…ctor(IEnumerable1 collection) +436 System.Linq.Enumerable.ToList(IEnumerable
1 source) +69
Litium.Application.Caching.<>c__DisplayClass4_03.<LoadByPrimaryKey>b__0(LitiumDbContext db) +789 Litium.Application.Data.DbContextExtension.ExecuteInDbContext(IServiceProvider serviceProvider, Func
2 loaderFunc) +98
Litium.Application.Caching.EntityCache2.Get(IEnumerable
1 key) +999
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
Litium.Application.Runtime.ExceptionEnlightenment.PrepareForRethrow(Exception exception) +49
Litium.Application.Caching.LoadableCacheItem.get_Value() +97
System.Linq.WhereSelectArrayIterator2.MoveNext() +145 System.Linq.WhereEnumerableIterator
1.MoveNext() +124
System.Linq.d__172.MoveNext() +173 System.Linq.WhereEnumerableIterator
1.MoveNext() +124
System.Linq.Buffer1..ctor(IEnumerable
1 source) +281
System.Linq.d__1.MoveNext() +116
System.Linq.Enumerable.FirstOrDefault(IEnumerable1 source) +243 Litium.Application.Web.Routing.RoutingServiceImpl.TryGet(DomainNameRouteLookupInfo lookupInfo, DomainNameRouteInfo& routeInfo) +523 Litium.Web.Routing.ChannelResolverImpl.TryGet(RouteRequestLookupInfo& routeRequestLookupInfo) +1013 Litium.Web.Routing.PageRoute.GetRouteData(HttpContextBase httpContext) +285 System.Web.Routing.RouteCollection.GetRouteData(HttpContextBase httpContext) +258 System.Web.Routing.UrlRoutingModule.PostResolveRequestCache(HttpContextBase context) +68 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +223 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +213 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +91