The adjustments to turn on/off this feature have been built and these changes are now committed to the master branch on the GitHub repository.
I've built in some more changes to BlazorForum and went ahead and implemented them on this support forum. If you want to see the code, it's available in on GitHub HERE. I want to build in the ability to turn this feature on/off in the admin settings before merging it with the master.
- I've added a new Up/Down Vote feature that will allow you to show when you've found a post helpful.
- I added a count display to the Category page to display how many posts have been made to a topic.
- I refactored the ForumTopic component a little to clean it up and make it easier to read (broke some of it down into sub-components).
- I also changed some settings related to ApplicationDbContext in the Startup file. I've typically setup services in other ASP.NET Core applications as scoped services, and it worked fine, because the lifetime of the context ended after the request. While building in these changes, I realized this doesn't work well for Blazor applications, since with server-side Blazor, the scope is the lifetime of the connection. So, a request within a loop would attempt to use the context before the previous request had ended (resulting in a application crash). So, I switched things to setup the services as Transient and that fixed it. For more info about service lifetimes, check out this link (scroll down to the Service lifetimes section) https://docs.microsoft.com/en-us/aspnet/core/fundamentals/dependency-injection?view=aspnetcore-3.1
0Posted 133 days ago by selliott
Would be neat to be able to 'undo' an up or down click.Posted 61 days ago by cory2