
Build your first ASP.NET Core web API called Books and Authors, create a Books controller with an in-memory list of books and a get all endpoint tested with swagger.
Declare a get item by title endpoint that reads the title from the query string and responds to an HTTP get request, illustrating parameter passing via the query string.
Learn how to set up an in-memory database with the Entity Framework Core, install the NuGet package, and map C# classes to the database model using an ORM.
Create a database context class inheriting from DbContext, configure it to use an in-memory database named books and authors, and register it in the service collection with AddDbContext in Program.cs.
Seed an in-memory database with sample books by injecting the database context into the books controller, adding three books when the table is empty, and exposing a get all endpoint.
Implement a delete item endpoint with the HTTP delete verb to remove a book by id from the books table, handling not found cases and saving changes.
Duplicate the books controller to create an authors controller, rename properties to first name and last name, adjust endpoints like get author by last name, and test get all.
Install SQL Server Express Edition, download, install, and set up SQL Server Management Studio to connect to the local database engine; for macOS or Linux, run SQL Server in Docker.
install two entity framework nuget packages, sql server and design, then switch to sql server by adding a dbcontext constructor with options and using the books and authors connection string.
configure a real sql server database for an ASP.NET Core app, define db sets, and apply entity framework migrations to create authors and books tables.
Build a one-to-many relation between books and authors using a foreign key author_id and navigation properties. Apply a migration to update the database and verify the new foreign key.
Seed a database with initial data using on model creating and has data method, enabling conditional seeding for authors and books with migrations and a database update.
Map create update book and author DTOs to entities, update controllers to return new IDs, and validate automapper mappings for adding and updating items in the API.
Explore validation attributes in ASP.NET Core, including required, string length, range, email, phone, url, and regular expressions, and apply them to book and author dtos with endpoint checks.
Explore how launch settings define http, https, and IIS Express profiles to run an ASP.NET Core app on Kestrel or IIS Express, with automatic browser launch to Swagger.
Topics: .NET | ASP.NET | .NET Core | ASP.NET Core | ASP NET Core
Not much time for studing? - for bussy beginners, who want to learn ASP.NET: COMPLETE step-by-step course in just 6,5h!
This comprehensive course provides a step-by-step introduction to building modern web applications using ASP.NET Core and Entity Framework. Under the guidance of Dr. Albert Sadowski, students will learn how to design, develop, and deploy fully functional web applications from scratch.
The course begins with a practical, hands-on project — creating a simple book list application. Through this project, learners will gain a foundational understanding of application architecture, data manipulation, and user interaction. Step by step, the course expands to cover key concepts such as controllers, endpoints, and HTTP requests, demonstrating how to implement CRUD (Create, Read, Update, Delete) operations in a clean and structured way.
In later modules, participants explore database integration using Entity Framework, learning how to define entities, manage database contexts, perform migrations, and seed data efficiently. The course also introduces service-oriented architecture, showing how to move business logic from controllers to dedicated service layers for better maintainability and scalability.
Students will further master essential topics such as Data Transfer Objects (DTOs), AutoMapper, and data validation techniques to ensure smooth data exchange and application reliability. The final part of the course focuses on ASP.NET Core application configuration, covering Program.cs, middleware, environment settings, and configuration management through appsettings files.
By the end of this course, learners will have a solid foundation in web application development with ASP.NET Core, capable of building and managing professional-grade web solutions.