re: ASP.NET Core Blog tutorial: using LiteDB VIEW POST


Hi! Something seems to be missing from the Index view. Where does the Model take the values?
Do you have the Github Repo with full code?
PS: I like this tutorial!


Hiya Zoltan

No it's all there

return View(blogRepo.Posts.Find(
            p => p.Public == true && 
            p.Created <= DateTime.Now && 
            p.Deleted == false)

That right there is all that's required, below that point I explain what the query itself does.

as for the github repo, not yet but I'll most likely create one today as I write the 4th part.


I am referring to the html view, not the controller, there's missing something, if I follow part 1,2 and 3. You just iterate through something in the view, but show me the whole file, maybe in the header, @model xyz... is missing? Waiting for the GitHub repo, take your time, I am just studying this, no urgency.

That is odd, I'll gladly create the repo right now for you to look at.

There ya go:

\o/ all right! What was the issue if I may ask?

I was playing around with the controller, and I forgot to add a .ToList(), I did a bit different version than yours.

Awesome, glad you're experimenting, it's the best way to learn imho

code of conduct - report abuse