linkdotnet / Blog

A blog (engine) completely written in C# and Blazor. It aims to be a simple use and easy to extend platform. Blogposts are written in Markdown and are rendered to HTML. This gives all the flexibility needed to express yourself but also have an easy way of creating posts in the first place.

Home Page:https://steven-giesel.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SqlServer Unhandled Exception

GraemeWellington opened this issue · comments

I am using Microsoft Visual Studio Community 2022 (64-bit) - Preview Version 17.8.0 Preview 1.0
I have installed the latest .NET8 SDK Version="8.0.0-rc.1.23421.29"

I implemented PersistenceProvider": "SqlServer and the system built the database ok. I logged in and went to Administrator and created 1 blog and submitted ok. However returning to the dashboard an unhandled exception error was encountered. After each restart the same error.

Just to get things working I tracked down the problem to: LinkDotNet.Blog.Domain BlogPost.cs line 28:

public IReadOnlyCollection Tags { get; private set; }

I changed this to:

public IList Tags { get; private set; }

This created a build error in: LinkDotNet.Blog.Web.Controller RssFeedContoller.cs line 98:

        s => new BlogPostRssInfo(s.Id, s.Title, s.ShortDescription, s.UpdatedDate, s.PreviewImageUrl, s.Tags),

I changed this to [add explicit cast]:

        s => new BlogPostRssInfo(s.Id, s.Title, s.ShortDescription, s.UpdatedDate, s.PreviewImageUrl, (IReadOnlyCollection<string>)s.Tags),

Then all worked.

Hey thanks for reporting the issue.

This is a known regression from preview 7 to rc 1: dotnet/efcore#31722

That said, I will most likely revert the last commit with the update until the issue got fixed.

I reverted the last upgrade on master. That should make everything work again.

OK great - awesome project!

OK great - awesome project!

Thanks - if you have other issues/requests let me know.