C# ASP.NET Core Practice - Library Due Date Tracker
Ayesha Fatima
December 21st,2020
The purpose of the project is to create a tool that will help to keep track of all the books that are checked out of a library.
- The use of scaffold
Author.cs
model with MVC Controller with Views, using Entity Framework(EF) to createAuthorController.cs
and Author Views. The views scaffolded areCreate.cshtml
,Delete.cshtml
,Details.cshtml
,Edit.cshtml
, andIndex.cshtml
. - The creation of model context,
LibraryContext.cs
from scratch. - Created relational database between author and book using EF migrations within NuGet Package Manager Console.
- The creation of
BookController.cs
from scratch using empty MVC controller class. - The creation of BookController and
Views()
from scratch using empty controller files. - The customization of views within
cshtml
type files. - The creation of customized Exceptions as
ValidationExceptions.cs
to generate custom Exception messages. - The use of LINQ to conduct queries.
- Library due date Tracker requires Visual Studio 2019 (VS 2019) and ASP.NET Core 3.1
- This application requires a few packages installation through NuGet
- Entity Framework (EF) Core is used in this application to perform data access against the MySQL database (MariaDB) and server (Apache)
- This application requires the use of Code First Migrations using EF in .NET Core to set up databases with dummy data
- This application requires a fundamental knowledge of SQL Syntax
- Developers tools such as XAMPP are recommended to engage and use this application
$ git clone https://github.com/ayeshafatima977/Library-Day3.git
$ cd Library-Day3
$ cd Library-Day3
$ start devenv Library.sln
Use the NuGet Package Manager to install packages:
- Entity Framework ASP.NET Core Design.
- Entity Framework Pomelo Entity Framework Core.
- Entity Framework ASP.Net Core SqlServer.
PM> dotnet add package Microsoft.EntityFrameworkCore.Design
PM> dotnet add package Pomelo.EntityFrameworkCore.MySQL
PM> dotnet add package Microsoft.EntityFrameworkCore.SqlServer
Initiate initial migration to create a database with data seeded.
PM> dotnet ef migrations add InitialCreation
PM> dotnet ef update database
The result of successful database migration and update is shown below in PHPMyAdmin localhost
with the database name mvc_library.
Create View | List View |
---|---|
Details View | Author Index View |
---|---|
Note: AuthorController Index()
view was created using scaffold, MVC Controller with Views, using Entity Framework.
- Start the Debugging tool within Visual Studio 2019.
- A browser will automatically open to show a view of the database.
Note:This is a Cumulative Assignment and Continuation of Library Day1 Library Day2
Please visit above links or visit Trello Board for full requirement of the project.
- MVC Review
- Add Data in Home Page
- Layout view
- Good resource for ASP .NET
- Date Time Today
- DateTime.AddDays
- DateTime? NULL value types
- Getter Only Auto properties
- Table Element
- Bootstrap Button Classes
- DateTime
- Loading Related Data
- DateTime Compare 14.Lambda Expressions
- BootStrap Typography
- Bootstrap Form fields
- Form
- BootStrap:Tables
- Format Syntax on GitHub