Register Log in

Added Up/Down Vote Feature and More

Posted 134 days ago by selliott
Edited 133 days ago

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)
  • 0

    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.

    Posted 133 days ago by selliott
  • 0

    Would be neat to be able to 'undo' an up or down click. 

    Posted 61 days ago by cory2

Post a Reply

You must be logged in to add a new post.
An error has occurred. This application may no longer respond until reloaded. Reload 🗙