Create ASP.Net Core Web API (step by step for beginners)

Build database driven CRUD API with C#, ASP .NET Core MVC and Entity Framework Core. Project based learning

4.50 (430 reviews)
Udemy
platform
English
language
Web Development
category
instructor
3,530
students
10 hours
content
Nov 2020
last update
$74.99
regular price

What you will learn

Creation of CRUD API in Asp .Net Core

.Net Core Services

Data Transfer Objects (DTO)

Use of DbContext for 1-to-many and many-to-many relationship

Understanding of Dependency Injection

Understanding of the use of Interfaces in C# and .Net Core

Description

Welcome to Creating CRUD API in Asp .Net Core and Entity Framework Core.

As the title of the course suggests, we will be creating an API that will handle Creating, Reading, Updating and Deleting records from a database with the help of .Net Core and Entity Framework.

This course is all about CRUD operations. Step by step, we will set up a complete API to handle each of the operations in a multi-table database. For the next several hours, we will dedicate our time to interfaces, dependency injection, 1 to many and many to many database relationships, .Net Core Services, Models, Data Transfer Objects, Controllers and Actions, and of course, C# language. But don’t let any of that scare you. Quite the opposite.

Get excited to learn a ton of new material and dive into the new world of .Net core. The course makes the learning easy with the mix of slow introduction of new material, repetition, and lot of practice! Every line of code is coded on camera, there are no mysteriously appearing blocks of code. Every step is explained every time, not just the first time you are introduced to it. And you will have a chance to practice what you learned in homework assignments.

Let’s go over few details. First, let’s discus what this course IS


  1. Introduction to creating CRUD API using Asp .net Core and Entity Framework.

  2. We go over complete creation of CRUD API

  3. I introduce new concepts as they are needed in regards to progression of the project

  4. This is a “follow along” and “practice what you learned” course

  5. No code is skipped over.


What this course is NOT:

  1. Complete or Deep Dive course

  2. Learn C# or .net core course

  3. Theory with explanation and code snippets

  4. Ready to Deploy Real World project


1. API are a huge subject, and so is net core and so is Entity Framework. In this course we will create a CRUD Web API in .Net Core. Nothing more, nothing less. Do not expect a dive into security, database optimization, asynchronous processing or anything else. Just CRUD. Pure and simple. We will work only with C# language inside .net core. So do not expect any javascript or fancy javascript framework or library. There is none in this course. But don’t expect to use this course as a “Learn C# course”. It is not that. I’m sure you will pick up some new syntax and C# tricks, but you do need some C# skills prior to taking this course. The project we use is a great starting point as it introduces several of the essential techniques and concepts, including often neglected CRUD operations on database tables with many-to-many relationships, this certainly isn’t a deploy-ready project.

2. Remember, this is a course, and a practical tutorial. There are lot of courses that will show you the way into one topic and then quickly move on to another topic. This is not one of those courses! My goal is to lead you step by step, all the way, through the new territory inside .Net core and introduce you to new concepts and topics and help you learn them. And equally important is to then help you understand and retain what you learned through practice and repetition. If you prefer to be shown something once and then jump to another topic, then this course is NOT for you. If, on the other hand, you learn by combining explanation, coding along, and practicing the concepts while still having the option to see the instructor coding the whole solution, then this course is definitely for you!

3. Did this ever happen to you? You took a course, and you just loved it! Everything was clearly explained, and you had lots of aha moments. Then the course ended…and suddenly, you felt lost. You felt like you learned so much while taking the course, yet could barely remember anything once it ended. Even when you revisited the source code supplied by the instructor, it just didn’t even seem familiar. Suddenly you felt like you didn’t learn anything. All the concepts that seemed so clear during the course felt totally foreign when you were on your own. In my experience, this is often the case when you simply take a course that starts exactly where your current skills are, but moves past the threshold of skills you are ready for. Like trying to go from crawling straight to sprinting. In this course, we go step by step, introducing new concepts slowly and only after you had a chance to practice what you learned.

4. is this course for you? What skills should you have before taking it? If you are a programmer with decent understanding of OOP principles and C#, than you have the all the skills needed to benefit from this course. There are no prerequisites for .net core, or entity framework or how to create an API. Since you are interested in this course, I assume you heard of these things and perhaps played around a little too. That’s all that is needed to take this course.

Well, let's code!

Content

Introduction

Introduction
Demonstration of the Final API
Source Code, Help, Discounts, and Misc

Preparing the .Net Core Services, Models, and Database

Creating New Project
Adding MVC Service
Relationships And Properties for Classes
Creating Models
One To Many Relationship Requirements
Creating Navigational Properties For 1-to-Many Relationships
Many to Many Relationships Requirements
Creating Intermediary Classes
Summary of Relationships Between Entities
Data Annotation
HOMEWORK: Data Annotation
More Data Annotation
Adding NuGet Packages
Adding Connection String
Adding DbContext
Adding OnModelCreating Method
HOMEWORK: Adding BookAuthor Intermediary Class to ModelBuilder
Adding BookAuthor Intermediary Class to ModelBuilder
Creating Database Migration
Seeding The Database
Seeding The Database and Reviewing Inserted Data

Creating API's - Before we start

Reviewing API Calls Requirements
Dependency Injection And Inversion of Control

Creating Countries HttpGet API

Creating ICountryRepository Interface
Implementing ICountryRepository Interface Part 1
Implementing ICountryRepository Interface Part 2
Creating GetCountries API
Testing GetCountries API
Registering ICountryRepository Interface Service
Creating Country DTO (Data Transfer Objects)
Finishing GetCountries API
Creating GetCountry API
Creating GetCountryOfAnAuthor API

Creating Categories HttpGet API

HOMEWORK: Implement ICategoryRepository Interface and API
Creating ICategoryRepository Interface
Implementing GetCategories and GetCategory Methods
Finishing Implementation of ICategoryRepository
Creating GetCategories API
Creating GetCategory API
Creating GetAllCategoriesForBook API

Finishing DTO and Interfaces for Reviews, Reviewers, Authors, and Books

HOMEWORK: Create Remaining DTO Classes
Creating Remaining DTO Classes
HOMEWORK: Crate Remaining Interfaces
Creating IBookRepository Interface
Creating IAuthorRepository Interface
Creating IReviewerRepository Interface
Creating IReviewRepository Interface

Finishing Country and Category Interface Implementation

Implementing GetAuthorsFromACountry Method
Implementing GetAllBooksForCategory Method

Creating Reviewer HttpGet API

HOMEWORK: Implement IReviewerRepository Interface and API
Implementing IReviewerRepository Interface
Creating GetReviewers API
Creating GetReviewer API
Creating GetReviewsByReviewer API
Creating GetReviewerOfAReview API

Creating Review HttpGet API

HOMEWORK: Implement IReviewRepository Interface and API
Implementing IReviewRepository Interface
Creating GetReviews API
Creating GetReview API
Creating GetReviewsOfABook API
Creating GetBookOfAReview API

Creating Author HttpGet API

HOMEWORK: Implement IAuthorRepository Interface and API
Implementing IAuthorRepository Interface
Creating GetAuthors API
Creating GetAuthor API
Creating GetBooksOfAuthor API
Creating GetAuthorsOfABook API

Creating Book HttpGet API Calls

HOMEWORK: Implement IBookRepository Interface and API
Implementing IBookRepository Interface

Creating IsDuplicate Validation for Country and Category

HOMEWORK: Implement DuplicateCountry and DuplicateCategory Methods
Implementing IsDuplicateCountry and IsDuplicateCategory Methods
Finishing Testing from our ToDo List

Continuing Creating HttpGet API Calls For Book

Creating GetBooks API
Creating GetBook API
Creating GetBookRating API

Create, Update, And Delete APIs

Review of Create, Update, and Delete API Calls

Create, Update, And Delete API for Country

Adding Create, Update, Delete Methods to ICountryRepository Interface
Implementing Create, Update, Delete Methods For ICountryInterface
Creating CreateCountry API Part 1
Creating CreateCountry API Part 2
Creating UpdateCountry API
Testing UpdateCountry API
Creating DeleteCountry API

Create, Update, And Delete API for Category

HOMEWORK: Add Create, Update, Delete Category API
Adding Create, Update, Delete Methods to ICategoryRepository Interface
Implementing Create, Update, Delete Methods For ICategoryInterface
Creating CreateCategory API
Creating UpdateCategory API
Creating DeleteCategory API

Create, Update, And Delete API For Review

HOMEWORK: Add Create, Update, Delete Review API
Adding Create, Update, Delete Methods to IReviewRepository Interface
Implementing Create, Update, Delete Methods For IReviewInterface
Creating CreateReview API
Testing CreateReview API

Handling Reference Loop

Reference Loop Error Handling

Finishing API CRUD for Review

Creating UpdateReview API
Creating DeleteReview API

Create, Update, And Delete API for Reviewer

HOMEWORK: Add Create, Update, Delete Reviewer API
Implementing Create, Update, Delete Methods For IReviewerInterface
Creating CreateReviewer API
Creating UpdateReviewer API
Creating DeleteReviewer API

Create, Update, And Delete API for Author

HOMEWORK: Add Create, Update, Delete Author API
Implementing Create, Update, Delete Methods For IAuthor Interface
Creating CreateAuthor API
Creating UpdateAuthor API
Creating DeleteAuthor API

Create, Update, And Delete API for Book

Requirements For Implementing Book Repository
Adding Create, Upate, Delete Methods to IBookRepository Interface
Implementing Create, Update, Delete Methods for IBookRepository Interface Part 1
Implementing Create, Update, Delete Methods for IBookRepository Interface Part 2
Implementing Create, Update, Delete Methods for IBookRepository Interface Part 3
Implementing Create, Update, Delete Methods for IBookRepository Interface Part 4
Injecting Interfaces Into BooksController
Validating Book ModelState
Creating CreateBook API
Testing CreateBook API
Creating UpdateBook API
Testing UpdateBook API
Creating DeleteBook API
Testing DeleteBook API

Final Testing All CRUD Operations for All APIs

Final Testing
Bonus Lecture - Other courses for you to take

Screenshots

Create ASP.Net Core Web API (step by step for beginners) - Screenshot_01Create ASP.Net Core Web API (step by step for beginners) - Screenshot_02Create ASP.Net Core Web API (step by step for beginners) - Screenshot_03Create ASP.Net Core Web API (step by step for beginners) - Screenshot_04

Reviews

Michael
October 12, 2022
I am following along and most importantly I am learning. I am learning things I did not understand before but have used.
Daniel
April 8, 2022
Nice steady pace, whilst remaining informative and interesting. Good job so far. Particularly like the pdfs for explaining the one to many and many to many relationships to reference back to when needed.
Alin-Paul
January 4, 2022
The instructor could explain a little bit slower. I must pause the video each 5 secs, because the instructor types things in FTL. We should also have some time to really UNDERSTAND what is said there.
Adam
October 20, 2021
I'm moving into a role where I have to understand existing code developed in an MVC pattern. I have some C# knowledge but am new to MVC. This is wonderful to see it unfolding from the start. Even though it is different to come in to an existing project - and I think that the database has been developed separately from Visual Studio and linked in via different use of the ModelBuilder, this is so useful and I can now see how this is all structured. I have so much more hope in what I am seeing and am becoming confident that I can navigate what is an enormous code base.
Leonidas
June 17, 2021
This course was exactly what I was looking for! The tutor is amazing and gives good and analytical examples and explanations, along with exercises for the student that are explained later on. For sure, I'm going to check some of his other courses as well...
Alfred
June 8, 2021
This has been a very informative course so far. The teacher moves a little fast for me, but I have learned a lot even in just the first quarter of the course.
Vilfred
April 25, 2021
Very good course for illustrating the core features of a Web Api. The author gave also a very good illustration of the repository pattern that he used in his API.
Tu
November 11, 2020
The instructor clearly understands that repetition is one of the most important activities in learning if we really want to make it stick. Therefore there is a lot of repetition so that we can put what we've learned to practice and almost turn it into muscle memory. I really like this way of learning, but naturally it's not for everyone. The course takes the student through the basics of web API development, and it is by no means super advanced but more geared towards C# beginners who have just started to grasp object oriented programming and are starting to get comfortable with the .NET namespaces etc. I also would suggest that it's easier to follow along if students have tried a bit of ASP.NET development in general. Nothing much, just a bit of reading about the MVC pattern would help. Course content reiterates a lot of what has been taught, and it's easy to follow along. Every line of code is being shown and talked about, and this is also something that I really appreciate. And although some of the tasks seem easy to understand and give me a "yeah, I can do that"-feeling if I just sit and passively watch the videos, I actually get a bit dumbfounded by how hesitant and unsure I get when I have to write the code myself without looking at the videos, so it's good to type along and try to do the homework given throughout the course. All in all, a very solid foundational course in web API development with ASP.NET Core. I'm glad I took this course, and it also helped me practice working with JSON. I haven't given this 5 stars because the course has not been updated to ASP.NET Core 3.1. This means that the student who wants to do it in 3.1 needs to figure out the differences themselves. It's nothing difficult, but still needs a bit of digging in the Q&A or the internet.
Manoj
July 3, 2019
It is an awesome tutorial. But, I was expecting basic authentication (register, login and logout). But it is not covered in this tutorial.
Nicolas
June 26, 2019
I am just starting, but it's exactly what I was looking for. It is so hard to find a good course on ASP .NET Core, and Pavol is good at explaining every step in the process, goes fast enough so that it's not boring or long to follow, but while every concept, or almost! If you haven't seen MVC before, it will definitely be hard to understand. But I barely know any C# and it's ok for me so far.
Elliot
June 24, 2019
Good series, but could be better. - I enjoyed that you went over all parts. - I found it helpful when you explained concepts, and why you used certain libraries. - I enjoyed the homework tasks, as helped with comprehension. - Would watch another of your videos. - I didn't like when you did not explain all of your uses of various libraries, or concepts. - Some sections where it felt like the videos should have been re-recorded, due to presenter errors. Leaving errors in, and coming back to fix them, is really confusing when you're learning.
Ken
May 20, 2019
Really well done and easy to follow. My only recommendation would be to add the unit of work pattern. Otherwise, great stuff!
Anthony
May 9, 2019
really been amazing I get to understand some db relationship as well a host of others as well, thanks
Jonathan
May 5, 2019
Bought your web forms and loved it and am loving this one as well! Thanks for being thorough and doing everything from scratch!
Palusko
April 11, 2019
Half way through and I am enjoying the course a lot. It's moving in the right speed for me. No bells and whistles, just good old fashioned coding on the camera. Easy to follow and understand. Love the homeworks. Overall, I feel like I am learning what the course is teaching - basics of CRUD API. EDIT: Just finished the course. I liked it a lot. This is definitely a hands-on course. It doesn't hide the repetitive tasks, it embraces them as a learning tool .The more you practice, the more knowledge you retain. Overall, it was a simple CRUD API yet there was still a lot of material covered. I want to start creating my own APIs and this course is a great starting point.

Charts

Price

Create ASP.Net Core Web API (step by step for beginners) - Price chart

Rating

Create ASP.Net Core Web API (step by step for beginners) - Ratings chart

Enrollment distribution

Create ASP.Net Core Web API (step by step for beginners) - Distribution chart
2306100
udemy ID
4/4/2019
course created date
5/13/2019
course indexed date
Bot
course submited by