First Post

Published on 12 January 2018

Welcome to a MiniBlog clone on .net core

The initial idea behind this was to learn about the differences when building a website on ASP.net CORE so that i can run on a raspberry pi, i am sure there were much easier ways to achieve that.

I choose MiniBlog1 as a starting point so that i did not need a database and ended up with a sqlite database for the identity tables as it seems you can no longer specify users in web.config like in previous versions of ASP.net using forms authentication.

###list of things i had to learn/work through

  • strongly typed configs (yay)
  • sqlite in ef core - Julie Lerman and Geoffrey Grosenback have a nice introduction to EF Core 1.0 on PluralSight2
  • upgrading packages can have terrible side effects (IOptions from Microsoft.Framework.OptionsModel/IOptions to Microsoft.Extensions.Options/IOptions leaving a reference to Microsoft.Framework.OptionsModel)
  • metaweblog api for Open Live Writer3 integration now using markdown monster4
  • XMLRPC thanks Shawn Wildermuth 5

Setting up EF CORE with SQLite

As easy as adding

...
"Microsoft.EntityFrameworkCore.SQLite": "1.0.1", 
...

to project.json (just be sure put add it after it dependencies or use the sort to fix things) Update startup.cs to use sqlite rather than sqlserver

        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            ...
            services.AddDbContext<ApplicationDbContext>(options =>
                options.UseSqlite(Configuration.GetConnectionString("DefaultConnection")));
            ...
        }

MiniBlog

An ASP.NET Core Middleware Component for Implementing MetaWeblog API