.NET 5 REST API Tutorial: 02 Entity, Repository, Controller (GET)

preview_player
Показать описание

This is the second part of my .NET 5 REST API Tutorial. You will learn:
• How to model an entity via C# record types
• How to implement an in-memory repository of resources
• How to implement a controller with GET routes to retrieve resources

#dotnet #restapi #tutorial
Рекомендации по теме
Комментарии
Автор

I am so happy to have found you it is extremely nice to not follow a video from 5 years ago and getting errors the creator didnt get back then lol keep it up man.

LPREZ
Автор

Excellent video, thank you very much.
Vs code tips:
Quickly "Copy and Paste": Click anywhere on the line and press "CTRL + C" and then "CTRL + V" to create a copy below the line.
Quickly "Remove line": Click anywhere on the line and press "CTRL + X".

maggototrebor
Автор

It's great that you used the new features in C# 9.0. It keeps me up to date with the language and understand when these features are useful. I'm really glad I came across your channel

thesuperiorman
Автор

Thank you so much for this series. Great work.

knowledgeforfun
Автор

What was the shortcut you used to quickly import System when creating the Guid property @ 3:30.

Akadehmix
Автор

For anyone that wants to solve this in a simple way (before going into dependency injection and other fun stuff) you can simply remove the initialization line on the controller constructor and just make the repository property static, like this:

private static readonly InMemItemsRepository repository = new InMemItemsRepository();

franciscobergeret
Автор

Great series. You earned a sub good man!

bendunaway
Автор

Master!! brilliant video thanks very much god bless you

johnherrera
Автор

Nice video but I want to point out that in the part where you define the repository class and specifically in the method GetItem(Guid id), there is no need to use the LINQ expression using "Where", instead, items.SingleOrDefault(item => item.Id == id) would get you the same result. The Where is redundant in this case. Your videos are very informative. Thank you.

christian.mar.garcia
Автор

very good your videos @Julio. What's the VS-Extension you used to show those fancy icons in the VS's project structure??

orneyd
Автор

your intellisense works like it tells you what the actual problem is, then you import packages etc. what should i install to make my vscode works like this? great tutorial btw thanks.

umutdemir
Автор

What code formatter are you using? Prettier doesnt work really well with c# files

HarisKhan-qysy
Автор

Hi Julio :) I would really love to recommend some tutorials for beginners like base generic class for controllers, repository pattern and some best practices for building a robust .NET Web Api pleease. Thank you ^_^

donmikkodanm.olmillo
Автор

Thanks for the toturial sir

what is your theme?

soud
Автор

3:30 Guid When I build the solution then only it is showing error message. How to make it automatic without building the solution.

When I press CTRL+. its not showing any suggestion to auto-import any extension do I need to use it here

Can you please help me what are extensions you are using in VS code

kartheeknandini
Автор

Hello :) I was wondering how do you get the intellisense like the using System.Collections.Generic and DateTimeOffset? I have installed the C# plugin yet I'm still not getting it. Thank you

donmikkodanm.olmillo
Автор

can u tell me what's extensions of auto import ?

faizalardhi
Автор

I am not getting VS Code intelligence is there any setting I am missing?

ShivamSingh-enfu
Автор

I suggest the VSCode extension "C# Extensions", by jchannon. It will help you in creating classes and interfaces by already filling in the namespace and class name.

Gabriel-klbt
Автор

GUID is getting changed each execution

darklen
join shbcf.ru