Тёмный
No video :(

Building a Serverless REST API With Azure Functions From Scratch 

Codewrinkles
Подписаться 27 тыс.
Просмотров 35 тыс.
50% 1

Building a serverless REST API with Azure Functions is a good exercise to get familar with all the ins and outs of Azure Functions. In this video we go from depth to depth by implementing complete CRUD operations for a REST API running 100% on Azure Functions. This setup allows us to go deeper into topics like function workers, dependency injection in Azure functions, using EF Core in Azure function, securing secrets via Azure Key Vault and much more. Make sure to not miss it!
Join this channel to get source code access and other perks:
/ @codewrinkles
Content:
1. Intro: 00:00
2. Create Azure Function App: 01:30
3. In process vs islolated Azure Functions: 02:16
4. Finalizing Azure Function App creation: 03:12
5. Azure Functions and Azure Key Vault: 04:09
6. Create Azure Functions Project: 05:06
7. Azure Functions settings: 05:56
8. Installing NuGet packages: 07:50
9. Create Product and DbContext: 09:12
10. Dependency injection in Azure Functions: 10:55
11. Creating API endpoints in Azure Functions: 14:03
12. Azure Functions Authorization Level: 15:16
13. Azure Functions HttpTrigger: 17:31
14. Working with Http requests in Azure Functions: 18:55
15. Implementing remaining endpoints: 21:27
16. Debugging Azure Functions locally: 25:10
17. Deploy Azure Functions: 26:11

Опубликовано:

 

16 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 89   
@jamesbest2221
@jamesbest2221 Год назад
This video is fantastic! Pure gold! It finally answers all the (head scratching) pieces that are needed to put together a full serverless api. I also very much appreciate how your videos have no fluff, and are meat-and-potatoes and pedal-to-the-metal all the way, which is great for someone like me who has very limited time and can learn fast. Cheers!
@Codewrinkles
@Codewrinkles Год назад
Really appreciate your feedback. I'm glad you enjoyed it.
@Tech-wn8tp
@Tech-wn8tp 10 месяцев назад
precisely described what i also felt
@FiggyCricket
@FiggyCricket Год назад
I know that you mentioned doing migrations with EF Core could be difficult. But I wanted to let folks know that scaffolding with EF Core works very easily with Azure Functions. I feel like database first is more typical in production environments so I wanted to point that out.
@user-hy1dm4in6b
@user-hy1dm4in6b 8 месяцев назад
Really good video. A good follow-up might be explaining the objects you created beforehand, especially the "sql" secret since the app won't run without that part working. I'm not asking for an in-depth code-first migrations video, but a database first explanation so new people can get this app up and running. Excellent work!
@seeker4430
@seeker4430 4 месяца назад
Fantastic... Underrated content... To the point, clear and covers everything beautifully
@visheshgrade9861
@visheshgrade9861 3 месяца назад
Randomly saw this today, to check my understanding, covered everything in a short video. I generally don't comment, but great work 😀. Now will see more videos here 😅
@Codewrinkles
@Codewrinkles 3 месяца назад
Glad you enjoyed it!
@vrtualminds-wi7si
@vrtualminds-wi7si 5 месяцев назад
The best tutorial regarding Az Functions.
@ramfattah211
@ramfattah211 Год назад
Loving these C# and Azure videos. Looking forward to learning more from you.
@Codewrinkles
@Codewrinkles Год назад
I'm glad to hear. There will be one Azure video each Sunday or Monday till at least the end of the year.
@danielegiovanetti9258
@danielegiovanetti9258 Год назад
I can't find other words to say thank you. You special!
@Codewrinkles
@Codewrinkles Год назад
Wow, thank you!
@markharby180
@markharby180 Год назад
This is one of the best tutorials I have found on API Azure Functions, great work.
@Codewrinkles
@Codewrinkles Год назад
Glad it was helpful!
@samitkrghosh4388
@samitkrghosh4388 Год назад
This tutorial is really helpfull for those who started carrier as azure developer like me . Thanks a ton....
@irvinwaldman4233
@irvinwaldman4233 Год назад
Thank you for the video and awesome channel. One recommendation: the background music is a bit distracting. Your voice is fine by itself :)
@Codewrinkles
@Codewrinkles Год назад
Thanks for the tip!
@sahoopradipta
@sahoopradipta 5 месяцев назад
Very nice and easy explanation. Thanks..
@PauIyM
@PauIyM 3 месяца назад
I keep getting an error when running the application locally and I submit a post request with the name and price. It says Executed “ProductsGetAllCreate” failed. Exception while executing function. Format of the initialization string does not conform to the specification starting at index 0.
@VinhPham-hz8ny
@VinhPham-hz8ny 2 месяца назад
Thank you for the great tutorial. I don't know why many tutorial is only showing the unsecure way. Why can we do one that show actual authenticated request?
@TaNTaTANify
@TaNTaTANify 7 месяцев назад
Great video! thanks! it was very understandable and with a nice pace.
@Codewrinkles
@Codewrinkles 7 месяцев назад
Glad you liked it!
@Ram92026z
@Ram92026z 11 месяцев назад
You are divine! This is so helpful. Thank you.
@Tech-wn8tp
@Tech-wn8tp 10 месяцев назад
thank you guru! subscribed you and learned something from you today. you are the best!
@kushagrame
@kushagrame 9 месяцев назад
Thank you sir very beautifully explained....
@lordmen92
@lordmen92 Год назад
Thanks for awesome sharing
@Codewrinkles
@Codewrinkles Год назад
Thanks for watching
@TheinTunZaw-uj1un
@TheinTunZaw-uj1un 2 месяца назад
Can i call the stored procedures of SQL Server of Azure via serverless functions?
@mohammedmabtoul3032
@mohammedmabtoul3032 4 месяца назад
Great vid thanks but i want consume those api links on my project to get data and post it into my database how can do it ?
@dayank.8499
@dayank.8499 Год назад
Please how to fix that ; System.Private.CoreLib: Exception while executing function: ProductsGetAllCreate. Microsoft.Data.SqlClient: Format of the initialization string does not conform to specification starting at index 0.
@AurelioCE88
@AurelioCE88 Месяц назад
Nice video, can i use minimal api in azuee function?
@anonymoos
@anonymoos Год назад
Excellent video, thank you! I would like to see how you setup the database, and manage it outside of the Azure Functions. Also, you're using Visual Studio here, and not Rider. Is this functionality not supported in Rider?
@Codewrinkles
@Codewrinkles Год назад
There was nothing to fancy with the database. I had another ASP.NET Core Minimal API proiect where I have registered the DbContext. I have run a migration and then updated the database. Rider also supports these functionalities. I have done all the documentation part of the video on Rider. However, the UI for creating Azure Functions and other small details are different. But, as there were some UI differences and most people from the audience will use Visual Studio, I thought of also using it to keep everythin as clear as possible.
@rubberuk
@rubberuk Год назад
Excellent video.
@Codewrinkles
@Codewrinkles Год назад
Glad you liked it!
@jacopocaira5199
@jacopocaira5199 11 месяцев назад
Hey! Do you have a video that cover the auth topic for the functions? Thanks, Great video!
@arvindchourasiya4738
@arvindchourasiya4738 8 месяцев назад
Great video, so much to learn here. I just have one doubt, in connection string you did specify vault key only, not db credentials then how it is connected to SQL Server, is the data comes from Azure or SQL ?
@philipquarles4679
@philipquarles4679 10 месяцев назад
Great video! Showing how to do local testing is exactly what I was looking for! I would like to use Dapper instead of Entity Framework. Is that possible?
@Steve3dot1416
@Steve3dot1416 10 месяцев назад
20:11 would it be possible to create two separate method for the get and the post by only changing the attribute and use "get" for the first one and "post" for the second one? This way, each method do only one thing.
@yusunryu1129
@yusunryu1129 Год назад
Thank you. I really enjoyed your vide. I think sql setup is missing in this video. How do you setup the azure sql for Functions?
@avneetsingh2010
@avneetsingh2010 Год назад
Amazing work!
@Codewrinkles
@Codewrinkles Год назад
Thank you! Cheers!
@pentanoir
@pentanoir Год назад
Great video, but EFCore 7 targets .NET6 so there is no reason to choose version 6 when installing the nugget package.
@Codewrinkles
@Codewrinkles Год назад
That's what I also thought initially. But if you insall EF7 in the exact same setup you will get errors on build that suggest target mismatches because of some other librarbies that both .NET 6 and EF7 relies. Als I have found that this is a common issue and SO is full of issues like this. The answer was pretty much always to use EF 6. If you have more insights into this and cand share how exactly we can make it work running .NET 6 anf EF7, please share it. I'd appreciate it a lot.
@samitkrghosh4388
@samitkrghosh4388 Год назад
If you please create some more topics on azure service bus integration with azure function would be very helpful
@juhairahamed5342
@juhairahamed5342 6 месяцев назад
Good explanation..thanks
@sushilb7994
@sushilb7994 11 месяцев назад
Great video! I have a question - how to use azure key vault when we specify something in the input binding like service bus queue trigger where queue name and connection string is supposed to be taken from azure key vault. Any help on this would be really appreciated.
@nuthanmurari
@nuthanmurari 8 месяцев назад
Thank you for your video on this in-process model. If possible can do a video on isolated-model how DI is to be and how to inject or register project reference library in azure functions. I am getting a lot of DI issues similar like this. Exception: System.InvalidOperationException: Unable to resolve service for type 'System.IRequestContext' while attempting to activate 'MyFunctionApp.AntiVirus.FileScanService'. I used IRequestContext in FileScanService and this issue is coming in my azure function when i inject my my IFileScanService. Kindly help me here on how to fix this
@DoorThief
@DoorThief 5 месяцев назад
You have to register your service in the setup class so that you can activate the class that needs it (constructor)
@mouradaissani8957
@mouradaissani8957 Год назад
thank you about the video , i would recommand to use the other fasion witch is azure function in an isolated worker process
@Codewrinkles
@Codewrinkles Год назад
Can you also give some arguments for your recommendation. I had some real challenges with isolated workers in real production applications. First of, custom bindings are nod directly supported. Even though possible, it's a real pain. We needed Custom trigger definitions for Azure Service Bus triggers using NServiceBus message handlers. Also, I have experienced some targeting problems when using certain libraries or SDKs, when we needed to create dedicated assemblies for certain classes that were targeting two different dotnet runtimes. I don't recall the exact specifics, but this workaround was suggested in some GH issues by MS folks. Another bad experience I had with isolated workers is that they ran out of memory at a certain point and it took us a lot of troubles to actually find the root cause for why the function simply stopped working. Due to these reasons I admit I have a slight preference for in-process workers.
@pigrebanto
@pigrebanto 9 месяцев назад
Thanks. Did you use Azure SQL?
@EvandsonDantas
@EvandsonDantas 11 месяцев назад
This video is the nicer that i found. But still confuse for me. AWS look like more simple.
@sauravbhatta5303
@sauravbhatta5303 Год назад
Very good video. Also make a video on service fabric. Deploy the app there as well.
@Codewrinkles
@Codewrinkles Год назад
Will try. Thank you for the visit.
@saroshwadia
@saroshwadia Год назад
awesome video as usual - three thumbs up - Could you highlight some pros and cons in terms of speed, cost etc. of using AF vs WebAPI? Thx
@Codewrinkles
@Codewrinkles Год назад
That's actually a very good question. What I want to point out is that if you need to build an API for an application I wouldn't recommend using Azure Functions for that. It's simply not scalable and the intent of serveless computing is not to replac eyour APIs. I would therefore use Azure Functions for background processing, for simple and standalone web hooks and other cross cutting concerns, to offload your API.
@colllm
@colllm 8 месяцев назад
Great content... than you. But it's hard to pay attention with the background music 😕
@user-lw5uh9ir7y
@user-lw5uh9ir7y 6 месяцев назад
Nice Work
@panditjitechtalk314
@panditjitechtalk314 Год назад
How to call Ef core operations in azure timer function ? Any help would be appreciated.
@Codewrinkles
@Codewrinkles Год назад
You have dependency injection in Azure Functions, so you do it similarly.
@rohinirohini532
@rohinirohini532 Год назад
Will you please do a video on Unit testing on serverless rest Api Azure functions
@Codewrinkles
@Codewrinkles Год назад
I'm not sure unit testing functions themselves would be useful. I'd integration test them.
@kudanmedia
@kudanmedia 8 месяцев назад
Hi, any chance you might have done the video for running migrations in azure sql db? Thanks for this video, it's exactly what I have been looking for. I'm pro Code First Approach and this video is a good start.
@Codewrinkles
@Codewrinkles 8 месяцев назад
I haven't done a video on this specific topic. What is the challenge that you have? Running migrations in azure sql (or just updating the database, to be more precise) works exactly the same. You just need to provide the connection string to your Azure SQL database and then run update-database from package manager console. P.S: Thanks for joining the membership program.
@kudanmedia
@kudanmedia 8 месяцев назад
@@Codewrinkles Thanks for the fast response. I'm getting this error: Azure.Identity.CredentialUnavailableException: 'DefaultAzureCredential failed to retrieve a token from the included credentials.
@bloopers2967
@bloopers2967 Год назад
Very good video
@Codewrinkles
@Codewrinkles Год назад
Thanks for the visit
@bloopers2967
@bloopers2967 Год назад
@@Codewrinkles Can you please create in-depth video on tweaks related to designTimeFactory as you said in this video. It'll much appreciated as my current project using it and I'm having difficulty understanding it. Thank you in advance!
@bloopers2967
@bloopers2967 Год назад
I'm waiting for this video sir
@Codewrinkles
@Codewrinkles Год назад
@@bloopers2967 I am really considering it, but i can't promise a timeline for this. I'll need to define a story around it, but it's definitely on my ToDo list.
@bloopers2967
@bloopers2967 Год назад
@@Codewrinkles thank you, take your time mate
@user-uq8gy2go5l
@user-uq8gy2go5l Год назад
Thank you
@Codewrinkles
@Codewrinkles Год назад
You're welcome
@infinitezymalny
@infinitezymalny 9 месяцев назад
The very importat part is omitted, I mean migration.
@gorman2283
@gorman2283 Год назад
Is this still current with NuGet installs? I can’t find Azure Identity, Azure Security, Azure Functions Extensions or Microsoft EntityFramework Core
@Codewrinkles
@Codewrinkles Год назад
Something's odd. This video is not that old.Just a few months back. Nothing was released in the meantime. I just checked and I can still find these packages.
@gorman2283
@gorman2283 Год назад
@@Codewrinkles I figured out what I did wrong. I am currently trying to debug and getting the error message "Microsoft.Azure.WebJobs.Script: Error configuring services in an external startup class. Azure.Security.KeyVault.Secrets: A secret with (name/id) sql was not found in this key vault." I think this is referencing the Startup code but I don't know how to fix it.
@gorman2283
@gorman2283 Год назад
I figured out what I did wrong again. Great video and thanks for responding!!! Subscribed on both my YT accounts!
@ajaychourasia5910
@ajaychourasia5910 Год назад
It is really great tutorial. Do you share source code some where?
@Codewrinkles
@Codewrinkles Год назад
Ambassador members get the source code after each video. So, to gain access to the source code, you need do become a member. Link in the description.
@handsome_man69
@handsome_man69 9 месяцев назад
Handsome man
@saadablat2998
@saadablat2998 Год назад
la crême de la crême, thank you
@Codewrinkles
@Codewrinkles Год назад
Glad you enjoyed it. Also take a look to the newest video about workflow orchestration with Azure Durable Functions. MIght be interesting as well.
@igorr4682
@igorr4682 3 месяца назад
Given your heavy accent and rapid speech, I find this video rather challenging to follow, making it less useful for me.
@Codewrinkles
@Codewrinkles 3 месяца назад
Wow, that's some very constructive feedback. Thanks
@sonofvideo4696
@sonofvideo4696 Год назад
Excellent video.
Далее
女孩妒忌小丑女? #小丑#shorts
00:34
Просмотров 10 млн