This is awesome. I inherited a bunch of work at my job and the API is all in .Net - Also, I "fixed" the time-stamps for your video so we can click on them and be directly taken to that point in the video :) - 1:27 - Introduction - 1:49 - Quick Peek at the API - 4:35 - What You'll Learn - 5:47 - Application Architecture - 10:39 - Create the Project - 11:24 - Anatomy of a ASP.NET MVC app - 13:52 - Program & Startup Classes - 16:50 - Run Our App - 18:10 - Updating our Startup Class - 20:01 - Using Postman - 22:22 - Create Our Controller - 30:33 - Create Our Model - 34:15 - Quick Look at SQL Server - 35:32 - Entity Framework Core Command Line - 37:09 - Create our DB Context - 41:30 - Connection String in appsettings.json - 46:05 - Updating our Startup Class - Again! - 54:02 - Create Migrations & Update Database - 58:52 - Adding Test data to SQL Server - 1:02:11s - Updating our Controller - our first GET Action - 1:10:49s - Updating our Controller - our 2nd GET Action - 1:15:59 - Updating our Controller - our POST Action - 1:23:48s - Updating out Controller - our PUT Action - 1:32:42 - Updating our Controller - our DELETE Action
@@binarythistle Les i get error CS0234: The type or namespace name 'addMvcCore' does not exist in the namespace 'Microsoft.AspNetCore' this error any help please.Thanks
My Friend, I have travelled very far to find this PERFECT video explaining .NET core MVC!! I'm a full stack JS dev, its surprising how complicated other people make .NET core MVC seem. What a great teacher and coder! Thank you
One of the best tutorials to understand the basics of the whole thing (.Net Core , MVC, EF and API ) ! , thanks so much for your time and your great effort !
This was SO helpful...I needed to pickup on .Net Core API creation for my job and this one helped immensely to get an overview of how to do it....Please keep the videos coming in...much love and respect!!
Great tutorial. Thank you for doing everything from scratch. In case anyone else got stuck at the Entity Framework step, I also had to run the following command to install the ef tool globally: "dotnet tool install --global dotnet-ef"
This was a fantastic tutorial. So many other people don't get a good balance if when to go into detail and when not to. I felt as though you did a really good job on this. Explained relivant info and briefly mentioned the rest so we could research it for ourselves. Thank you for taking the time to make this! I found it very helpful.
Great video For .Net Core 3.0 you can either 1) Use the new webapi template 2) Use this command to setup MVC: services.AddMvc(option => option.EnableEndpointRouting = false).SetCompatibilityVersion(CompatibilityVersion.Version_3_0);
Thank you man, I really appreciate that you speak clearly, so for people that English is not part of the "normal" language, help so much that you speak simple and clear. Also the content of your video is so helpful. Have a great month ;D
Hat mate! Being from Scotland people usually say I speak too quickly! So nice to hear that I'm not doing that on the videos. Have great month yourself and thanks for taking the time to feedback. Les
Hey Tien! Glad the the tutorial worked for you. I'm writing an "eBook" at the moment with some more advanced topics. When done with that I'll be making more videos. Cheers, Les
Most excellent. Thank you! I backed my way into this from your Microservices full course, wherein you alluded to a previous video explaining websockets and signal r, and then from that video into this one when I was running into problems with versioning stuff, being as I am a relative newbie. I had to work through a number of issues because so much has changed, but I am so very grateful for the whole experience. I learned about Postman and how to use NuGet to pick an align versions of this with versions of that, and, of course, how to do what the tutorial taught. I am much improved for your efforts and mine. Bless you, Les! Now, I am going to resume the tutorial of yours that led me here, intending to complete that one so I can get back to where I was in your Microservices tutorial. I really can't thank you enough, Les.
You are the best!!. I will keep following your tutorial and recommend same to my colleagues. Thanks for your efforts and to say it comes free, I lack words to express how I feel. Thank you Les!
Thanks Les, this is a great introduction. It's a lot to take in for a new guy but it wasn't overwhelming. PS: In .Net 3 you gotta modify "AddMvc" in the Startup.cs to this: services.AddMvc(options => options.EnableEndpointRouting = false).SetCompatibilityVersion(CompatibilityVersion.Version_3_0);
This is pretty cool and straight forward, I was looking for some asp net core tutorial and got confused by the tutorial but this one is different. Hope I can give multiple likes.
Good one mate! Just an observation... at the PUT action you should also check if the id passed in the route and the id of the object passed in the body exists... otherwise you're going to get an exception
Hi Pierre - top man! I really need to move away from SQL Serve for a while and use some other DB technologies! I'm glad you got it working with MySQL. Good job! Cheers, Les
A video specifically for beginners about what it was worth indicating in the title, a few comments. To work with a real database, it is better to use IQueryable. And for the context of the database it’s better to create an asynchronous service that implements an interface for weak connectivity and inject it into the controller so the code will be cleaner the controller will not perform any checks and unnecessary movements by calling only the service and passing parameters there.
Hey Brady! Nice comment mate! Thanks for the topic suggestions, I always love getting them. I'm finishing up an eBook at the moment, when I'm finished it'll be back to making more videos! Cheers, Les
Thank you so much Les! I was so in need for someone who can teach me in such simple way. Hats off to your dedication and effort in helping us all out here. Really appreciate it.
You make this video it's very meaningful. It's still helpful, even though i'm using .net core 3.1. You should make more video with empty template. Thanks for sharing your knowledge.
Hi Les, amazing tutorial !!! At work, we often invoke stored procedures to supplement CRUD. So I extended your example, just a little bit, to do a "FromSql" query in the controller to get the Result-Set from a stored proc. The changes are minor, and if you are interested, I could send you my code snippets. It might help someone else out. Thanks Again !
Thank you for your clean and clear explanations. You must do this tutorials on Udemy or other platforms your are better then many of the "trainers" there. I learn from you in one video what i have not in hours on video courses and tutorials.... Keep this great job that you do and ... expand it :)
Thank you so much for this tutorial! I love that this is such a beginner-friendly one. But most of all, I want to thank you for doing this in a text editor. As someone who doesn't like IDEs anymore (because it does a lot of magic behind my back), looking for tutorials about .NET related things is hard because they always use Visual Studio. Like how are you going to learn Azure deployment of a Blazor web app when you just press the publish button in your IDE and poof it works... Thanks again for this, this taught me a lot. Hopefully, you make more! :)
Great video. It's hard to find a .Net Core tutorial using CLI. Most of the tutorial in youtube are using VS PMC. Just wanted to point out that EF Core have an Update method so you don't have to write the State Modified to do an update. Looking forward for an advanced tutorial on .Net Core from you
Great! It was very easy to create my first REST API using .Net Core. I have to say that my experience with .Net Core is null... :) This video is high recommended!!!
Great video, i've learned a lot. Doing it on Visual Studio game me a little problem with packages, but in the end everything worked like the video. Thanks.
There was an update to dotnet. If you're following the tut. be sure to use this command when using entity: dotnet tool install --global dotnet-ef --version 3.0.0
Hey mate - thank you! Got my hands full at the moment with the "day job", this channel, blog etc! Don't think I'd do your startup justice. Good luck with whatever you're doing - I hope it's a MASSIVE success! Les
Thanks for making this video it clears many of my concerns. But small request can you please make a video creating the same with NHibernate and PostgreSQL.
Hi Mohd! I'm probably going to do some videos on using PostgeSQL, but probably won't be covering NHibernate in the near future, but you never know. Thanks for watching! Les
Thanks mate. Didn't want to make a video this long, but wanted to try to explain things in a bit more detail, so ended up almost 2 hours! Glad you found it to be useful.
Thank You Les for this tutorial! Enjoyed it, You explained it really well and in great details. Can you please do a tutorial on OData and GraphQL thanks
Hi Lee. Great tutorial .Thanks for you effort and time. You mentioned in this tutorial that you covered Json Patch Method in another link. Do you perhaps have this link? I need to patch back to MSSql dataset
@Les Jackson Thank you soo much for this Video , I am glad to watch this , I always wanted to learn ASP.NET Core in Linux Ubuntu , but no video was in Visual Studio Code , But your Tutorial Helped me a lot, Once again Thank You So much
None of the previous tutorials that i've seen, explain so clear and from scratch the base concepts that you need to understand to develop a big project, and for my case , this info is very important because I am new on this framework. Thanks a lot really. I have one question, what videos or info do you recommend to get after this video? My goal is to learn to build APIs on .net core with a "good" architecture and viable for the current market. Greetings from Argentina
Hi Pablo! Thanks for the feedback, I try and make the videos I'd want to see when starting out with something new... So I'm really glad you like the approach. Thanks again for taking the time to feedback, I really appreciate it. Cheers, Les
You're welcome! What topics do you recommend me to learn afther the concepts of this video? My goal is to learn to develop APIs on .NET Core. I have some intermediate level of knowledge about C#, and I've worked doing APIs on Node and Spring.So "I know the concepts of developing an API". But I am really newbie on dotnetcore. Thanks again!
Very clear and straight forward tutorial, well-done! Somehow [Route("api/[commands]")] didn't work so I just used a hardcoded url [Route("api/commands")] instead, and I also have to create my own appsettings.json, as it's not created automatically.
Hi Jens - Great question! For me it's a bit like the difference between driving an auto-transmission car, (Visual Studio), and driving a manual transmission (VS Code). Both cars will get you where you need to be, but you feel like you "driving" a manual car more, you're more connected to it. So yes VS Code is a bit harder work, but I just feel I get to learn more as a result. But basically it comes down to personal preference. BTW I used Visual Studio when I developed with Windows Forms, (because of the designer), but as I've focused more on back-end stuff, (API's), I've moved more to VS Code. Visual Studio is awesome though! Hope that answers your question.
Just a note for those of you using dotnet core v 3.0 instead of adding Mvc to the services, use "AddController()" and "AddRouting()" to the ConfigureServices method. Then in configure, use app.UseRouting(); and app.UseEndpoints(endpoints => { endpoints.MapControllers(); } Microsoft wants endpoint routing to be done differently.