CRUD with Blazor in .NET 6 🔥 Full-Stack with a Web API, Entity Framework Core & SQL Server Express

Поделиться
HTML-код
  • Опубликовано: 18 окт 2024

Комментарии • 169

  • @PatrickGod
    @PatrickGod  Год назад

    🚀 Join the .NET Web Academy with a 30% discount - closing soon!
    👉 www.dotnetwebacademy.com/courses/academy?coupon=dnwas23yt

  • @josbexerra8115
    @josbexerra8115 2 года назад +2

    Gracias Mister Patrick, por compartir conocimiento..... saludos de los Andes Peruanos, se merece un coffee cappuccino

  • @darklen14
    @darklen14 2 года назад +6

    One thing to add is if you opted to do Dbase first and created a table on your own, make sure you add Table and Column annotiations in your Models or you will get 500 server errors.

  • @enmingwang6332
    @enmingwang6332 2 года назад +5

    One of the best tutorials! Thank you so much for your time and efforts for creating such a clear and succinct tutorial!

    • @PatrickGod
      @PatrickGod  2 года назад

      Thank you so much for your kind words! Glad you like the tutorial! 😊

  • @graynoble4795
    @graynoble4795 2 года назад +1

    Yes on the validation question, thank you!!!!

  • @nelsonrivers8546
    @nelsonrivers8546 2 года назад +7

    Your Blazor E-Commerce video series course is very good. Thank you for that. Can you also show Database First approach. I have found that most companies already have databases in place, and I would like to see a Database First approach(instead of a Code First approach). Would like to see Scaffolding of an existing database.

    • @PatrickGod
      @PatrickGod  2 года назад +5

      Great suggestion! Thanks a lot for your feedback and for enrolling!
      You're so right about existing databases in organizations. Problem is, in my experience, these database lack proper foreign keys, a good design in general, and so on. This does make a db first approach harder. Still, let me think this through. 😊

    • @megamerchannel2060
      @megamerchannel2060 2 года назад +1

      @@PatrickGod Would love to see database-first approach used also. In my particular case the relation between multiple tables and/or getting data from one table that references other tables (without really knowing what the content is of those).
      Current project I'm working only allows me to access one table in a db (no logical reasoning behind that demand, but need to roll with it).

    • @jeremaine
      @jeremaine 2 года назад +1

      I second to that. In my previous companies, I never experience making an app thru code-first approach, it's always database first.....

    • @graynoble4795
      @graynoble4795 2 года назад

      Second the second on DB first!!!!

    • @craigsunderland3849
      @craigsunderland3849 2 года назад

      @@PatrickGod Would definitely like to see a database first approach on this :-)

  • @kapteinwalvis
    @kapteinwalvis 2 года назад +1

    Thanks, came here only for the SQL setup and connection. very helpful

    • @PatrickGod
      @PatrickGod  2 года назад

      Glad it helped! Thanks for your feedback!

  • @Picike85
    @Picike85 Год назад +2

    Okay so the answer for your question at 38:11 is that on your controller for the GET endpoint you didn't specify a route, therefore, it is understood as "/". The route is /api/superhero since it's in the SupoerHero Controller. If you would have specified [Route("superheroes")] you would have had to do a call to /api/superhero/superheroes. I do not have a clue why how you got a 200 for the call though :)

    • @TheSpudBear
      @TheSpudBear Год назад

      Isn't it because in the controller, in the GetSuperHeroes method, there's only "return OK(Heroes)"? I'm fairly new to this but it is my interpretation of why the 200 is shown.

  • @LukeAvedon
    @LukeAvedon 2 года назад +1

    Your attic room looks sooooo cozy.

  • @IvanAndreev91
    @IvanAndreev91 2 года назад +4

    Great video, thank you! Best tutorial.
    Too bad I dealt with Blazor and EF before then. But I gained knowledge regarding the structuring of the application

    • @PatrickGod
      @PatrickGod  2 года назад +1

      Glad I could help! Thanks a lot for your feedback, Ivan! 😊

  • @FourDollarBill
    @FourDollarBill 2 года назад +5

    Great job! Thank you very much for your work, Patrick.

    • @PatrickGod
      @PatrickGod  2 года назад

      Glad I could help! Thanks a lot for your feedback! 😊

  • @victorescobar4369
    @victorescobar4369 Год назад

    Thank you for your time and willingness to share your knowledge.

  • @Bogdanjak00
    @Bogdanjak00 2 года назад +3

    Thanks a lot, very good tutorial. But I have a question. Is it possible to prepare such a guide for .NET MAUI BLAZOR applications?

    • @PatrickGod
      @PatrickGod  2 года назад +4

      Thank you very much, Bogdan! Sure, I've already got a .NET MAUI Blazor tutorial on my list. So, it's coming soon! 😊

    • @jesusnaun1981
      @jesusnaun1981 2 года назад +1

      Maui blazor crud with entity framework will be fantastic

  • @bailimohamedali1466
    @bailimohamedali1466 2 года назад +1

    itwas a good tutorial, the best thing the fact that I did many mistakes I was able to understand more and try to solve those stupid mistakes by my self with reading code, really thanks I'm gonna move to the next one then build my first .net app
    Thanks a lot really !!!!

    • @PatrickGod
      @PatrickGod  2 года назад +1

      Glad you liked it! Thanks for your feedback! 😊

  • @NweNi
    @NweNi 2 года назад +1

    Thank you very much for your videos! I 'm always waiting for tutorial of DB first approach webapi. :)

    • @PatrickGod
      @PatrickGod  2 года назад

      You are very welcome! Thanks for your feedback. DB first is on my roadmap. 😉

  • @giannisamanatidis3206
    @giannisamanatidis3206 Год назад

    I want to thank because you helped me solve a bug that I had for three weeks

  • @JamesBundy-d2v
    @JamesBundy-d2v 11 месяцев назад

    Hey Patrick! Great Video. It is teaching me so much. Quick question. In my SuperheroRazorpages file. My monster service is not lighting up the same color as yours in the for each loop and i can not show my data to the table. It appears to be injected correctly. Any Clue whats up?

  • @elsaan1968
    @elsaan1968 2 года назад

    Great Job, learned a lot about Blazor and entity framework. Keep on going the good work. Thank you!

    • @PatrickGod
      @PatrickGod  2 года назад +1

      Thank you so much for your feedback! Means a lot! 😄

  • @julianaburrow7131
    @julianaburrow7131 Месяц назад

    Very helpful! Thank you.

  • @macram4042
    @macram4042 2 года назад +1

    Thanks Patrick., Can I request another tutorial with image saving(post, put) and display(get) together how to use the tableview. thank you

    • @PatrickGod
      @PatrickGod  2 года назад

      Noted. Thanks for your feedback! 😊

  • @kingdev896
    @kingdev896 Год назад

    Very good tutorial. Thank you much

  • @seokhyunyoun
    @seokhyunyoun 2 года назад

    Great video. Thank you
    59:01

  • @dante85warrior41
    @dante85warrior41 Год назад

    estoy viendo tu curso tiempo que no uso .net luego de esto para perfeccionar conocimientos que me recomiendas seguir

  • @tamashirotod
    @tamashirotod 2 года назад

    Excellent Course!!!!! Thanks the time you dedicated to this.

  • @SirBrahms
    @SirBrahms Год назад +1

    How would I do that using MySQL instead of SQL?
    Also great tutorial, it really helped get me started

  • @nothingisreal6345
    @nothingisreal6345 2 года назад

    Nice demo. The only issue for me is to put the NavigationManager into the service. That is UI logic (navigation) in the access service.

  • @patrickguillen1194
    @patrickguillen1194 Год назад

    this help me alot, im doing this program i am learning so good.!

  • @leslyvicana3456
    @leslyvicana3456 2 года назад +1

    Really amazing. Thanks

  • @Artmageddon
    @Artmageddon 2 года назад +3

    Loved this video, and am also making my way through the E-Commerce course! I appreciate you showing us how to debug errors that came up along the way. For future videos, could you potentially show how to write unit and integration tests against Blazor, where possible? I've done a little bit on against WebAPIs and databases, but I'd love to see even a short video on how that works. Thanks so much!!

    • @PatrickGod
      @PatrickGod  2 года назад +2

      Thank you so much for your feedback and for enrolling! I added unit tests to my roadmap. Let me think this through. 😊

  • @ivanzrobok7148
    @ivanzrobok7148 2 года назад +1

    Good video. Thanks for examples crud in .net

    • @PatrickGod
      @PatrickGod  2 года назад

      You are welcome! Thanks a lot for your feedback! 😊

  • @ygmv21
    @ygmv21 Год назад

    Thanks for this video really cool. I have not clear at all the logic route of api components(controller, interfase and service) can you make a little video explaining that working schema?

  • @kubraaydn3451
    @kubraaydn3451 10 месяцев назад

    Hi Patrick, How do I show the data from IList in a dropdown?

  • @jordansali9435
    @jordansali9435 2 года назад +2

    Thank you Sir Patrick for this valuable, useful and very practical tutorial. Sir, may I request on how to implement the CRUD using sql server? Thanks in advance.

  • @brbtavares
    @brbtavares 2 года назад

    Thank you God!

  • @ankitmishra2612
    @ankitmishra2612 2 года назад +1

    Hi Patrick, big fan of your way of making the videos and explaining all the details....can you please make a video on CRUD operation in blazor server app in .net 6

    • @PatrickGod
      @PatrickGod  2 года назад

      Thank you for your feedback, Ankit! Your request is noted! ☺

    • @ankitmishra2612
      @ankitmishra2612 2 года назад +1

      @@PatrickGod actually I tried making a basic CRUD application, but faces issues during migration and database update, errors in the datamodel for null/not null values, and combination of startup.cs and program.cs

    • @PatrickGod
      @PatrickGod  2 года назад

      @@ankitmishra2612 Alright, let me see what I can do in a video. 🙂

  • @juanfelipecanocorrea8520
    @juanfelipecanocorrea8520 2 года назад +1

    excelente video, me parce que explica todo al detalle, lo bueno es que no importa que sea en inglés, con la opción de traducir, traduce muy bien

    • @dante85warrior41
      @dante85warrior41 Год назад

      algunas cosas no son claras despues de este video que seria bueno profundizar em imagino que fundamentos de c# o blazor directamente?

  • @michaelsteiner4548
    @michaelsteiner4548 2 года назад +1

    Any plans to make a tutorial about webhooks with .Net 6.
    Would really be interested.

    • @PatrickGod
      @PatrickGod  2 года назад +1

      Good idea! I'll add it to my roadmap. 😊

    • @benmerve23
      @benmerve23 9 месяцев назад

      hi! Is there an e-mail address where I can reach you?

  • @im.rakesh0827
    @im.rakesh0827 Год назад

    Hi, At first thanks for making such kind of good content.
    Actually i have a doubt in css isolation, how to isolate external css and how to apply css to a particular blazor component without affecting the other components, I will be very happy if you reply with some information and if possible try to make a video also for better understanding.

  • @rabb1tf00t
    @rabb1tf00t 2 года назад +1

    prefect tutorial for blazor thank you

    • @PatrickGod
      @PatrickGod  2 года назад

      You're very welcome! 😊

  • @zuzannanowak5411
    @zuzannanowak5411 Год назад

    For Mac-users, what do u recommended instead of SQL Server Express and SQL Server management studio?

  • @BAS-64
    @BAS-64 2 года назад +1

    Thank you !

    • @PatrickGod
      @PatrickGod  2 года назад

      You're welcome! Thanks for your feedback! 😊

  • @mentalstatement
    @mentalstatement 2 года назад +1

    I got your courses on Udemy… keep up the good work.

    • @PatrickGod
      @PatrickGod  2 года назад

      Awesome! Thank you so much, Alex!☺

  • @developercrucible
    @developercrucible 4 месяца назад

    How do you rerun the project when you download from github to be able to recreate the migrations?

  • @KansasPilla
    @KansasPilla 2 года назад +1

    Super Tutorial bro thank you so much

    • @PatrickGod
      @PatrickGod  2 года назад

      Happy to help! Thanks a lot for your feedback!

  • @Robd515
    @Robd515 2 года назад +1

    Hey Patrick, big fan, I'm always laughing at your funny comments and edits. I have an eye on that blazor* game course you have, it seems like a fun way to learn deeper functionality. I just have to finish my current Udemy course first.
    Keep up the good work, best regards.

    • @PatrickGod
      @PatrickGod  2 года назад

      Thank you very very much! Means a lot, really. 😊

  • @massiv0n
    @massiv0n 2 года назад +2

    Dude, you are amazing! just a quick question: you are going always from SuperHeroService to Server Solution, but how we can solve a communication from server solution to superheroservice or UI? I mean, How I can solve the communication if there is a UDP Listener or a SQL Watchdog in the server solution that is causing an event that some value must be shown into the user interface?

    • @PatrickGod
      @PatrickGod  2 года назад +2

      Thank you very much! 😊I think you should have a look into SignalR. This might help. And maybe I should make a video about that. 😉Take care!

    • @massiv0n
      @massiv0n 2 года назад

      @@PatrickGod thanks a lot for your response... I coded with SignalR but I cannot imagine how to merge this two systems.... if you make a video of course I will check it. Thanks again!

    • @benmerve23
      @benmerve23 9 месяцев назад

      hi! Is there an e-mail address where I can reach you?

  • @luisgabrielmenaarnedo7854
    @luisgabrielmenaarnedo7854 Год назад +2

    If someone faces this error
    "A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - La cadena de certificación fue emitida por una entidad en la que no se confía.)"
    you can solve it just by adding "Encrypt=False" in your ConnectionSting.

  • @freireguilherme
    @freireguilherme Год назад

    ty vm for this amazing content. it help me a lot, maybe I get a new job from this

  • @michaelsteiner4548
    @michaelsteiner4548 2 года назад +1

    Thanks!

    • @PatrickGod
      @PatrickGod  2 года назад

      You're very welcome! 😊 And thank YOU so much! Really appreciate it! 😁

  • @khoanguyen6584
    @khoanguyen6584 2 года назад

    cảm ơn GOd nhìu lắm :> Love

  • @tonygorham
    @tonygorham 2 года назад +1

    great video really helpful intro will be getting the courses!

    • @PatrickGod
      @PatrickGod  2 года назад

      Awesome! Thank you so much!! 😊

  • @BloodyClash
    @BloodyClash 2 года назад

    needing the controller and two services for the functions...isn't that a bit overengineered by microsoft ? and won't it be much easier just to use a one to many relation in the dbcontext ?

  • @caterpierre1682
    @caterpierre1682 2 года назад +1

    Love this! Great video, thank you!

    • @PatrickGod
      @PatrickGod  2 года назад

      Glad you enjoyed it! Thank you so much! 😊

    • @caterpierre1682
      @caterpierre1682 2 года назад

      ​@@PatrickGod Is it any tutorial about Audit Trail (logger that save user activity/event and their IP address to database like login, logout, create/edit something)? if not, Please make one Patrick

  • @joepsales3376
    @joepsales3376 Год назад

    Amazing video as always. Keep it up!🔥

    • @benmerve23
      @benmerve23 9 месяцев назад

      Hi Joep! Is there an e-mail address where I can reach you?

  • @luqui2000
    @luqui2000 Год назад

    I tried to follow this amazing tutorial on .NET 7 everything ok until I added the Entity Framework and DBContext, and suddenly My Blazor app stucks in Loading and nothing happens, Whata can I do? Regards

  • @BaconNinjaJR
    @BaconNinjaJR 2 года назад

    I am your fan, the other courses you have on Udemy from .NET Core 3.1, can i use it ? Or its become outdated ?

  • @mherman90
    @mherman90 2 года назад

    where do i learn more about http implementations and how to use them / routes, and also fetching methods like firstOrdefault? if i wanted to deepdive more in your other courses? :)

  • @tjpn2073
    @tjpn2073 2 года назад

    Great tutorial but I'm having challenges after I implement services what could be the solution it says failed to load resources

  • @ideiax
    @ideiax 2 года назад +1

    Excellent job! Thanks a lot for the video!
    I think the reason non-existing or existing services return 200 with error is that the view is responding (not the API)
    How do I remove the /api path from the view? For them not to respond as not found and for the api to respond to the /api path request

    • @PatrickGod
      @PatrickGod  2 года назад

      Good point! Thanks for the info! 😊

  • @dagobertoSanchez
    @dagobertoSanchez Год назад

    Gracias amigo, me salieron unos errores con mi proyecto, pero ya los solucionaré

  • @Neolisk
    @Neolisk 2 года назад

    Careful with strings represented as varchar(max) in SQL.

  • @Pedeninious
    @Pedeninious 2 года назад

    Great videos. I am trying to get my head wrapped around all of this so I created a student class with multiple emails but I am stuck. Perhaps a video like your relationships video, but using regular ui components rather than just swagger ui.

  • @bh5645
    @bh5645 2 года назад

    thanks a lot patric amazing explanation

  • @SFORSANDEEP
    @SFORSANDEEP 2 года назад +1

    You are really son of God!

    • @PatrickGod
      @PatrickGod  2 года назад

      Haha, thank you very much! 😊

  • @abdulnaserramadan37
    @abdulnaserramadan37 2 года назад +1

    Amazing, Thank you

    • @PatrickGod
      @PatrickGod  2 года назад +1

      My pleasure! Thanks a lot for your feedback! Hey there! 😊

  • @TheThomrb
    @TheThomrb 2 года назад +1

    you are a god

    • @PatrickGod
      @PatrickGod  2 года назад

      Thank you very much. 😅

  • @tonygorham
    @tonygorham 2 года назад +1

    i notice you ruin without debugging quite often is that why the hot reload isnt working ?

    • @PatrickGod
      @PatrickGod  2 года назад

      Should actually work without the debugging mode as well..

  • @goditto5694
    @goditto5694 Год назад

    why my vs2022 does not work completion of async syntax automatically in oninitializedasync and onparameterssetasync like you?

  • @dante85warrior41
    @dante85warrior41 Год назад

    one question why you put the variable so _http , i put this so http why dont choose so

  • @dagobertoSanchez
    @dagobertoSanchez Год назад

    Como se corrige lo del Update?

  • @JohnSmith-mm9yr
    @JohnSmith-mm9yr 2 года назад

    I was all about blazor but when I tried to use Identity I had trouble using the User to make relations to other tables of the database.

  • @AbdulAziz-xi1lo
    @AbdulAziz-xi1lo 2 года назад

    will you please create similar full stack app of type "Blazor MAUI HYBRID " ?

  • @dagobertoSanchez
    @dagobertoSanchez Год назад

    How to correct the update

  • @dmytrolisiev9916
    @dmytrolisiev9916 Год назад

    I like it. Thank you

  • @one-g4227
    @one-g4227 Год назад

    joining the bandwagon!

  • @VongsiLoryongpao
    @VongsiLoryongpao 2 года назад +1

    Appreciated

  • @jameslombard5698
    @jameslombard5698 Год назад

    Using EF7, when updating database with PM> dotnet ef database update , and error:
    provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted
    Add the following to the connection string:
    ; Trust Server Certificate=True;

  • @casastreetview9856
    @casastreetview9856 2 года назад +1

    thank you very much bro

    • @PatrickGod
      @PatrickGod  2 года назад +1

      You are very welcome! 😊

  • @MJZA93
    @MJZA93 Год назад

    I get stuck at 44:32 i can't access superhero dot anything.

  • @guilderw
    @guilderw Год назад

    Where can I find the souce code?

  • @romzkiedelfin2436
    @romzkiedelfin2436 2 года назад

    Hi sir Patrick Almighty :P, can you show us how to implement "Services" without "Interfaces" on it? Please do a video for this.. learn a lot from all of your videos. Thank you sir Patrick Almighty ;-)

  • @tft_heart
    @tft_heart 2 года назад

    How can your wasm and api service operate on the same port? Mine are on a different ports, when I try to assign them the same port I get an error, obviously. The problem with them being on a different ports is that I am confused how to point http client to the correct uri with a correct port.

    • @JC-yv1qj
      @JC-yv1qj 2 года назад

      Inside the blazor wasm project, for the uri, just use the address from your swagger browser window

  • @franciscogilt
    @franciscogilt 2 года назад +1

    Awesome tutorial. Your content and style are really engaging. Thank you.

  • @friendscoc7612
    @friendscoc7612 2 года назад

    can anyone tell how he calls controller method to the services i got after connecting to database

  • @kotoriitsuka1097
    @kotoriitsuka1097 2 года назад

    Hello, what is your font?

  • @jesperkped
    @jesperkped 2 года назад +1

    Audio normalization pretty please

    • @JC-yv1qj
      @JC-yv1qj 2 года назад +1

      Ja, bitte, every time an ad plays my speakers explode

  • @nadimahmeduk
    @nadimahmeduk 2 года назад

    Hi Patrick, this tutorial is really useful, many thanks. Just a quick question please, I tried to replicate this but get the following error when I try and edit a record and invoke the single record Razor page: "Unhandled exception rendering component: '

    • @BloodyClash
      @BloodyClash 2 года назад

      This usually happens when you don't have the server as startup project

  • @dante85warrior41
    @dante85warrior41 Год назад

    a mi no me carga los valores del edit sale error

  • @dante85warrior41
    @dante85warrior41 Год назад

    podrias subirlo a github me esta dnado errores en el minuto 33 xfa

  • @defiledgamingnl2284
    @defiledgamingnl2284 2 года назад

    hello, im following this tutorial but its giving me does not contain a definition for FirstName and no accessible extension method FirstName accepting a first argument of type .... could be found, are you missing a using directive or an assembly reference?

    • @miguelmota8036
      @miguelmota8036 2 года назад

      You have probably given your Hero page the same name as your Superhero class, at least that was the problem I was having

    • @DerekFNP
      @DerekFNP Год назад

      @@miguelmota8036 I think I am having the same problem. Do you just change the name of the page?

  • @quanghungnguyen3018
    @quanghungnguyen3018 Год назад

    thank a lot
    =)

  • @taicv2423
    @taicv2423 2 года назад

    Tks u sir

  • @broccool2300
    @broccool2300 2 года назад +1

    I bought the udemy course.

    • @PatrickGod
      @PatrickGod  2 года назад

      Awesome! Thank you so much! 😄

  • @moldraxian
    @moldraxian Год назад

    40:00 timestamp for later.

  • @lorakisyova4027
    @lorakisyova4027 2 года назад

    Thank you Patrick! This is a great tutorial, but I have one issue that I can't solve for several days now :( When I POST to my WebAPI to create a new hero using PostAsJsonAsync it sends null values to the controller. I managed to find an error that is thrown: System.Text.Json.JsonException: 'M' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0. I can't find a solution though :(
    Anyone having the same issue?

  • @furkanaydin890
    @furkanaydin890 2 года назад

    Migrate entirely to HTTPS to have cookies sent to same-site subresources

  • @cristianconrads9109
    @cristianconrads9109 Год назад

    Dont know why aal this tutorials are develop using SQL Server Express when you casn use SQL Server Developer Edition anf have the full stack.

  • @HenkvanderGeld
    @HenkvanderGeld Год назад

    Although very interesting, I missed the usage of DTO's (Data Transfer Objects). Is there a reason that you did not include that aspect? In my opinion you should never have your models used by the client. The client should use only the DTO (e.g. the SuperHeroDto). Did I miss something?

  • @hhadid9943
    @hhadid9943 2 года назад

    Hi Patrick .. Your videos and courses are very useful .. Thanks a lot .. Just one comment .. I guess there is a duplication in code returning the list of heroes in ( GetSuperHeroes ) & ( GetDbHeroes ), you can only ( return Ok(await GetDbHeroes()); ) in ( GetSuperHeroes ) .. Best Regards ..

  • @captainroxchiefit9149
    @captainroxchiefit9149 2 года назад

    This hour and a half video took me 5 hours lol