System.NullReferenceException: Object reference not set to an instance of an object. at Mainsite.Services.PostsRepository.GetPost(Int32 id) in C:\Checkouts\Mainsite2022\Mainsite\Services\PagesRepository.cs:line 152 at Mainsite.Pages.PagesModel.OnGetAsync(String department, Nullable`1 id, String title) in C:\Checkouts\Mainsite2022\Mainsite\Pages\Pages.cshtml.cs:line 81 at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory.GenericTaskHandlerMethod.Convert[T](Object taskAsObject) at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory.GenericTaskHandlerMethod.Execute(Object receiver, Object[] arguments) at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeHandlerMethodAsync() at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeNextPageFilterAsync() at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Rethrow(PageHandlerExecutedContext context) at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeInnerFilterAsync() 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.g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger) at Mainsite.Services.LocalLoginMiddleware.InvokeAsync(HttpContext context) in C:\Checkouts\Mainsite2022\Mainsite\Services\LocalLoginMiddleware.cs:line 55 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 ======= Connection: Keep-Alive Accept: */* Accept-Encoding: gzip, br, peerdist Host: www.dysart.org User-Agent: claudebot cdn-loop: cloudflare cf-ipcountry: US x-forwarded-for: 3.235.75.229 cf-ray: 86bb3f8a7ce15836-IAD x-forwarded-proto: https cf-visitor: {"scheme":"https"} cf-connecting-ip: 3.235.75.229 MS-ASPNETCORE-TOKEN: e0b137a8-cb1a-41a4-b005-66fbe279c4e6 X-P2P-PeerDist: Version=1.1 X-P2P-PeerDistEx: MinContentInformation=1.0, MaxContentInformation=2.0 X-Original-For: 127.0.0.1:55370 X-Original-Proto: http