
Engage with a full stack developer boasting over 20 years of experience in ASP.NET Core, .NET, Angular, and Azure, who teaches university coding across four universities.
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.
Create a delete item endpoint for books list in an ASP.NET Core app, using HTTP delete and from query to remove a book by id, returning ok or not found.
Add items to the books list via an http post using from body, then return a created response and verify with swagger and the get endpoint.
Learn how to add a dedicated update item endpoint in an ASP.NET Core books api using http put, query id, body updates, and updating a single book in the list.
Explore the role of controllers and actions in a web api, understand front-end back-end architecture, http requests and verbs, and create a books controller with endpoint headers and routing concepts.
Create the public controller action named get that returns an action result and uses the http get attribute for an ok response. The endpoint maps to api/books and get all.
Define and expose two get endpoints in the books controller: get all and get item, using http get routes with a from route id parameter, returning an action result.
Declare a public delete item action that takes an id from the root, uses http delete with the route delete item/{id}, and returns a 200 status.
Add a book class with id and title, and implement an add item endpoint that posts a new book from the body, returning a created status code.
Define the update item endpoint for the books controller using http put, taking id from the route and updated item from the body, returning an action result.
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.
Explore how endpoints are defined by http verbs and paths in controllers, and how parameters are supplied from route, body, or query strings.
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.
Create book and author entities and expose them as DbSet properties in the database context, establishing the books and authors tables and preparing for future relationships in Entity Framework.
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 get item endpoint in an ASP.NET Core API to fetch a book by id from the books table, returning 200 OK or 404 Not Found, tested with swagger.
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.
Add item endpoint adds new book records to the books table by binding a book from the request body, saving changes via the db context and testing with Swagger.
Implement a put endpoint to update a book by id, validate existence with first or default, update title and pages from body, save changes, and return ok or not found.
Implement a get item by title endpoint that queries the books table by title, returning 404 when not found and 200 with the book when found.
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.
Learn how to refactor ASP.NET core controllers by moving business logic into dedicated services, creating authors and books services with interfaces and implementations, and organizing code in a services folder.
Move the get all action from the books controller to the books service, implementing a get all method that returns a list of books via an injected database context.
Move the get item action from the books controller to the book service by implementing an interface method that fetches a book by id and handles not-found cases.
Move delete item functionality from the controller to the book service and author services, implementing a delete item method that returns true when removed and false if not found.
Move the add item operation from the controller to the service. Implement add item in the book and outer services, saving changes and returning the new IDs.
Move update item logic from controller to service by adding an update item method (id, updated item) returning true when updated, false when not found.
Move get item by title from the controller to the book service and implement get item by last name in the outer service, returning null when not found.
Add scoped services to the service collection in the program class, mapping IBooksService to BooksService and IOuterService to OuterService, then enable injection and discuss dependency inversion.
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.
Discover how book and author entities relate via a foreign key and use Entity Framework Core's include to attach the author subentity data to books in API responses.
Explore data transfer objects (DTOs) to decouple front end from back end, using a flat book dto with id, title, pages, and author's first name and author's last name.
Install the Automapper package, create a books mapping profile to map the book entity to the book dto, and map author first and last names from the author subentity.
Inject the mapper into book and author services and map entities to dto types. Expose dto-based endpoints for get all and get item by id, title, or last name.
Create update DTO classes for books and authors define data needed for create or update operations, map front-end DTO data to entities with a mapper, and persist changes.
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.
Apply validation to front end data using attributes on DTOs that transfer data to back end. Validate required fields, sizes, and formats for the create update book and author DTOs.
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.
Master the program class startup, from create builder to run, and explore the service container and dependency injection with iBookService, books controller, and add scoped or singleton.
Explore the http pipeline and middleware modules, showing how each module processes requests, passes http context to the next, and how responses move back through the reverse sequence to controllers.
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.
Learn how to read configuration from appsettings.json and environment-specific files. See how appsettings development JSON and appsettings staging JSON override appsettings.json and how ASP.NET Core sets environment in launch settings.
Develop practical skills in .NET core and full stack web development by exploring Angular and Azure projects, guided by an experienced university coding teacher with 20 years in the field.
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.