.NET 8 Web API & Entity Framework πŸš€ Full CRUD Course (with Code-First Migrations & SQL Server)

94,066
0
Published 2023-11-21
πŸš€ Join the .NET Web Academy: learn.dotnetwebacademy.com/

πŸ’– Support me on Patreon for exclusive source code access: patreon.com/_PatrickGod
🐦 Let's get social on Twitter/X: twitter.com/_PatrickGod
πŸ”— Let's connect on LinkedIn: www.linkedin.com/in/patrickgod/

Table of Contents:
00:00 - .NET 8 Web API & Entity Framework
01:07 - Starting Off: Creating the Web API Project
02:43 - Exploring the Project: Detailed Project Overview
06:54 - Data Modeling: Creating the Entity Class
08:01 - API Basics: Adding an API Controller
17:13 - Database Integration: Adding Entity Framework & SQL Server Database
26:43 - Migration Strategies: Implementing Code First Migrations
32:05 - Controller Implementation: Detailed Step-by-Step Guide
35:30 - Retrieving Data: How to Get a Single Entry
38:49 - Data Creation: Using POST to Create New Entries
44:19 - Data Update: Modifying Data with PUT Method
48:30 - Removing Data: Implementing the DELETE Method

#DotNet #WebAPI #AspNetCore

All Comments (21)
  • @danbarry3678
    Fantastic Tutorial! Thanks for all your attention to detail... One thing.. You can use "await GetAllHeroes() if you use a Task>> in the declaration: public async Task>> RemoveHero(int id) { var dbHero = await _context.SuperHeroes.FindAsync(id); if (dbHero is null) { //return NotFound("Hero not found."); return NotFound(await GetAllHeroes()); } _context.SuperHeroes.Remove(dbHero); await _context.SaveChangesAsync(); return Ok( //OK Returns Status code 200 }
  • @saifsaif8580
    since morning i stucked with some errors/exceptions after coming here i got the solution thank you so much for a great course
  • @enigma2886
    This is such an onpoint video. Amazing work !
  • @nelsonrivers8546
    Thank you. Be great if you could do the Database-First implementation whenever you show the Code-First implementation.
  • @Fred_Edx
    This is a great guide for learning.
  • @FSML
    Thanks for the tutorial., it was absolutely helpful. I appreciate it
  • @user-xp2ot3hu7c
    Thank you very much for the video tutorial, it became much clearer. It’s a pity that they didn’t use DTO as an example and didn’t break it down into services. I'm waiting for new videos
  • You reached a level of trust for me that, i like the video before i start watching it, and at the end i think with my self, "yes, i knew it". Congrats for your content, and hugs from Brazil to you, honestly, your channel is the most recommended by me for my friends! Even those who doesn't speak english hahahahaha
  • @Glockodile
    Hey Patrick great video, I know most of the stuff you do on Blazor is WebAssembly, is it possible you could do a video on how to add single account identity to a project that you configured without it at project creation, and you already have a database with a connection string? Thanks, Jordan
  • @scubaaddict
    Will Be great to see an example using CRUD and modal popup dialogs
  • @aamirrashid5255
    Hi Patrick, would appreciate if you make a video on Blazor server and controller API in one project using dapper generic functions.