5 private links
You can easily write unit tests by simply mocking the DbContext methods. For example you could mock the Entities property to always return a fake list of objects. That way the DbContext won’t make any external calls to your data layer.
How do you do that?
After settling on Hugo, coding a custom theme, writing a quick contact form handler and configuring the blog hosting, I’ve arrived at a setup that feel uncannily like it’s 1999. The site is fast, clear and simple. I write content in a plain old text editor, and drop image files into folders to use them. Publishing is almost instant thanks to a short bash script that builds the static content, rsyncs it to my server and purges the Cloudflare cache. There is no clunky CMS to configure and manage, no big web framework to deal with and update.