System.InvalidOperationException: The LINQ expression 'DbSet .Where(n => n.NoticeStatus == "Active") .Where(n => n.SchoolUnit == __SchoolUnitVB_0) .Where(n => n.NoticeExpireDate >= __CurrentDate_1) .Where(n => new NoticeBoard{ ID = n.ID, NoticeTitle = n.NoticeTitle, NoticeMessage1 = n.NoticeMessage1, NoticePicPath = n.NoticePicPath, NoticeAttachmentFilePath = n.NoticeAttachmentFilePath, NoticeExternalLink1 = n.NoticeExternalLink1 } .Grade == null || new NoticeBoard{ ID = n.ID, NoticeTitle = n.NoticeTitle, NoticeMessage1 = n.NoticeMessage1, NoticePicPath = n.NoticePicPath, NoticeAttachmentFilePath = n.NoticeAttachmentFilePath, NoticeExternalLink1 = n.NoticeExternalLink1 } .Grade == __GradeVB_2 || new NoticeBoard{ ID = n.ID, NoticeTitle = n.NoticeTitle, NoticeMessage1 = n.NoticeMessage1, NoticePicPath = n.NoticePicPath, NoticeAttachmentFilePath = n.NoticeAttachmentFilePath, NoticeExternalLink1 = n.NoticeExternalLink1 } .Grade == "9th Grade" || new NoticeBoard{ ID = n.ID, NoticeTitle = n.NoticeTitle, NoticeMessage1 = n.NoticeMessage1, NoticePicPath = n.NoticePicPath, NoticeAttachmentFilePath = n.NoticeAttachmentFilePath, NoticeExternalLink1 = n.NoticeExternalLink1 } .Grade == "10th Grade" || new NoticeBoard{ ID = n.ID, NoticeTitle = n.NoticeTitle, NoticeMessage1 = n.NoticeMessage1, NoticePicPath = n.NoticePicPath, NoticeAttachmentFilePath = n.NoticeAttachmentFilePath, NoticeExternalLink1 = n.NoticeExternalLink1 } .Grade == "11th Grade" || new NoticeBoard{ ID = n.ID, NoticeTitle = n.NoticeTitle, NoticeMessage1 = n.NoticeMessage1, NoticePicPath = n.NoticePicPath, NoticeAttachmentFilePath = n.NoticeAttachmentFilePath, NoticeExternalLink1 = n.NoticeExternalLink1 } .Grade == "12th Grade")' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to either AsEnumerable(), AsAsyncEnumerable(), ToList(), or ToListAsync(). See https://go.microsoft.com/fwlink/?linkid=2101038 for more information. at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.g__CheckTranslated|8_0(ShapedQueryExpression translated, <>c__DisplayClass8_0& ) at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression) at Microsoft.EntityFrameworkCore.Query.RelationalQueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression) at System.Linq.Expressions.MethodCallExpression.Accept(ExpressionVisitor visitor) at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression) at Microsoft.EntityFrameworkCore.Query.RelationalQueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression) at System.Linq.Expressions.MethodCallExpression.Accept(ExpressionVisitor visitor) at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression) at Microsoft.EntityFrameworkCore.Query.RelationalQueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression) at System.Linq.Expressions.MethodCallExpression.Accept(ExpressionVisitor visitor) at System.Linq.Expressions.ExpressionVisitor.Visit(Expression node) at Microsoft.EntityFrameworkCore.Query.QueryCompilationContext.CreateQueryExecutor[TResult](Expression query) at Microsoft.EntityFrameworkCore.Storage.Database.CompileQuery[TResult](Expression query, Boolean async) at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.CompileQueryCore[TResult](IDatabase database, Expression query, IModel model, Boolean async) at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.<>c__DisplayClass9_0`1.b__0() at Microsoft.EntityFrameworkCore.Query.Internal.CompiledQueryCache.GetOrAddQueryCore[TFunc](Object cacheKey, Func`1 compiler) at Microsoft.EntityFrameworkCore.Query.Internal.CompiledQueryCache.GetOrAddQuery[TResult](Object cacheKey, Func`1 compiler) at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.Execute[TResult](Expression query) at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryProvider.Execute[TResult](Expression expression) at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryable`1.GetEnumerator() at DU.Controllers.DUHighSchoolController.NoticeBoardView(String SchoolUnitVB, String GradeVB) in D:\a\1\s\DU\Controllers\DUHighSchoolController.cs:line 159 at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Logged|17_1(ResourceInvoker invoker) at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger) at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context) HEADERS ======= Accept: */* Host: dupeoria.org Max-Forwards: 10 User-Agent: claudebot X-ARR-LOG-ID: c6eb709a-3e9b-4b30-a859-79144565d335 CLIENT-IP: 107.21.176.63:39830 DISGUISED-HOST: dupeoria.org X-SITE-DEPLOYMENT-ID: duschool WAS-DEFAULT-HOSTNAME: duschool.azurewebsites.net X-Forwarded-Proto: https X-AppService-Proto: https X-ARR-SSL: 2048|256|CN=Go Daddy Secure Certificate Authority - G2, OU=http://certs.godaddy.com/repository/, O="GoDaddy.com, Inc.", L=Scottsdale, S=Arizona, C=US|CN=dupeoria.org X-Forwarded-TlsVersion: 1.3 X-Forwarded-For: 107.21.176.63:39830 X-Original-URL: /DUHighSchool/NoticeBoardView?SchoolUnitVB=DU&GradeVB=HS X-WAWS-Unencoded-URL: /DUHighSchool/NoticeBoardView?SchoolUnitVB=DU&GradeVB=HS