/Steps for setting up ASP.NET Core Web App (Model-View-Controller) for SQLite/
- Create a new project selecting ASP.Net Web App (Model-View-Controller) as the type of application. This has been followed with individual accounts settings for Authentication.
- Create a new class under Models folder and then add scaffolded item to project (MVC Controller with views, using EF).
- Install NuGet for SQLite (Manage NuGet Packages).
- Replace UsqSqlServer with UseSqlite in Program.cs.
- Replace value in ConnectionsStrings.DefaultConnection with "Data Source = REPLACEWITHDATABASENAME.db".
- Remove existing migrations (Remove-Migration in Package Manager Consolethis) This step avoids getting the error sqlite error 1 'near max syntax error' - due to nvarchar(max) included for existing migrations for SQLServer database).
- Add a migration called Initial (Add-Migration REPLACEWITHMIGRATIONNAME in Package Manager Console).
- Update the database (Update-Database in Package Manager Console).