A simple to-do app using ASP.NET Core MVC 2.1
By default this application targets your MSSQLLocalDB instance. If you don't have one, you can change connection string in appsettings.json file to target any instance of Microsoft SQL Server. Just change the value of DefaultConnection
. Alternatively, you can add a new key to this dictionary that contains your custom connection string and reference it in StartUp.cs:40.
SimpleToDo uses Entity Framework for connecting with database. Entity Framework enables programmers to use code first approach. This approach was used to create SimpleToDo application. All you have to do is follow these points:
- If you have a database instance on your SQL Server which is named
SimpleToDoDB
then either delete it or pick any other SQL Server instance. - Make sure that in Solution Explorer default project is set to
SimpleToDo.WebApp
. - Open
Packet Manager Console
. - Make sure that in Packet Manager Console "Default project" is set to
SimpleToDo.Database
. - Type
update-database
and confirm it by pressing Enter. - Database migration succeeded if you see "Done." in the last line of output.
When database is created, you can launch web application project by pressing F5 (make sure its still a default project - its name should be displayed in bold in Solution Explorer). Now the project will build and when build succeeds a new browser window will be displayed with default page. Please note that this application works best when using Google Chrome - a small issues might occur when using Mozilla Firefox or others.
By default application will display 10 tasks per single page. To change this you need to modify value passed to service method in TasksController.cs:27 from 10 to your own.
SimpleToDo relies on the following packages (via NuGet):
- FluentValidation.AspNetCore is used for view model validation purposes.
- X.PagedList.Mvc.Core is used to provide paging.
- AutoMapper is used to map between entity type and view models.
- Microsoft.EntityFrameworkCore is used for database communication.
- BuildBundlerMinifier enables possibility to minify css and javascript files during project build. It is especially helpful when you build this project in Release mode.
Also SimpleToDo uses these npm packages (via libman):
- [email protected] is used for page layout (note that default version of bootstrap used for project template is 3.3.7, I've updated it to the latest version).
- [email protected] is used to provide basic bootstrap functionalities and as a validation base.
- [email protected] is one of the main validation frameworks used.
- [email protected] is second one of the main validation frameworks used.
- [email protected] is used to create a toggler in place of checkbox in search results, tasks index and task details pages.
- [email protected] is used to display date and time pickers in creation and edition forms.
- [email protected] is just tempusdominus's dependency.
For this software I give absolutely no warranty and I'm not responsible for their behaviour.