Это видео недоступно.
Сожалеем об этом.

Using Stored Procedures with Entity Framework 6 CORRECTLY In .Net 6

Поделиться
HTML-код
  • Опубликовано: 13 авг 2024
  • Stored Procedures with Entity Framework 6
    Stored Procedures are a powerful way of querying databases in sql. It allows you to offload a lot to be handled by only the database as well as allowing you to have a piece of reusable sql code. So naturally being able to harness Stored procedures in a dotnet application would be nice to have, enter Entity Framework 6. It allows you multiple ways to call a Stored Procedure so I want to go over if Stored Procedures are better than using LINQ queries. Also, what are the limitations of EF6, or what would be easier done with another way of querying or using another library to call the stored procedures.
    Microsoft Documentation: learn.microsoft.com/en-us/ef/...
    Support Me On Patreon: / israelquiroz
    Follow Me On TikTok: www.tiktok.com/@israelquiroz9...
    All My Links Here: linktr.ee/israelquiroz
    #StoredProcedureswithEntityFramework6 #storedprocedure #StoredProceduresDotnet6
    TimeStamps
    ----------------------------
    00:00 Intro
    00:44 What Are Stored Procedures?
    01:08 Why Use Stored Procedures Instead Of LINQ?
    01:41 Limitations Of Entity Framework 6 When Using SQL Strings
    03:50 Introducing The API We Are Using
    04:23 Introducing The Database We Will Be Using
    04:57 Creating The Repository Pattern For Calling The Stored Procedures
    08:21 GetPlayer Stored Procedure Call Using EF6
    13:18 GetPlayerList Stored Procedure Call Using EF6
    14:37 CreatePlayer Stored Procedure Call Using EF6
    17:53 UpdatePlayer Stored Procedure Call Using EF6
    20:11 The BIGGEST ISSUE I Have With EF6 Calling Stored Procedures

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

  • @IsraelQuiroz
    @IsraelQuiroz  Год назад +3

    So Stored Procedures Or LINQ?

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

      Do you have a video about displaying the results on a razor page? I've been able to display SP results in a data grid that do not take parameters, but I am struggling to display results based on input, like with your GetPlayer(name, jersey). Thanks for the videos!

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

      @@yogifoot np I appreciate the love and I don't have one but it's in the pipeline

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

      Thanks for the tutorial, this what I needed. Regarding to answer your question above, I would say it depends on how complex how do you gather the data, sometimes we have a very complex query that has to be placed in stored procedure, that even inside that store procedure it called a SQL Functions, etc.

  • @raybelmo
    @raybelmo Год назад +7

    Back to the limitation, when it comes to loading multiple tables. You can create a new class that represents a row of data returned, then act on that as you would with other tables using stored procedure.

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

      That's a good solution!!!! Thank u 😊

    • @kevincordell9539
      @kevincordell9539 6 месяцев назад

      @@IsraelQuirozI had just this situation the other day until I found on Google someone saying you need to create a class with the columns. Once I did that, I was able to query the data because I could not use a Linq query due to the Over clause in my stored procedure. Otherwise, all my linq queries with multiple tables are used to create a new class and return that to the front end. Thanks for your video.

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

    I really enjoyed watching your video, I was breaking my head to use joins and this video explained, Exactly what I wanted to hear!!

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

      Your welcome!!! :)
      Go ahead and use Dapper or Ado .Net for stored procedures from multiple tables!
      I'm working on a Dapper video right now

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

    This is an amazing video. I totally loved it! There is so much confusion around this topic, especially on SO. Seems like MS does not want developers to use a database-efficient approach nowadays. I still prefer designing my database first using Stored Procedures, functions, and many other T-SQL's PL-SQL blocks components.

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

      Thank you! i really appreciate the kind words :)

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

    I really appreciate what you did here! It is very useful to me, a Dot Net beginner.

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

      Awesome! :) im happy u loved it hope to see u on the channel again

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

    But won't the code scanner flag that as sql injection because your concatenating a string?

  • @Sinxsz
    @Sinxsz 5 месяцев назад

    I'm Getting the Transfer-Encoding chunked error, can anyone know how to solve it?

  • @29oppman
    @29oppman Год назад +1

    Awesome video, hard to find people that speak clearly .... one option I do see in other videos is to use SqlDataReader , maybe do a video explaining how to use that as an option

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

      thank u! :) i try and do my best to be clear, professional, and to the point!
      ill keep that in mind thank u for the suggestion!

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

    Subscribed. Great Lesson!!

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

      Thank you!!!! happy to hear u loved it! appreciate the support!

  • @mrinaltantubai7341
    @mrinaltantubai7341 6 месяцев назад +1

    IS Full Stack Dot Net Developer with Angular a good career choice?

    • @IsraelQuiroz
      @IsraelQuiroz  6 месяцев назад +2

      .Net is not going anywhere any time soon Microsoft
      And Angular is getting super pushed and is getting awesome updates from Google
      So both technologies aren't going anywhere and it's what I do currently professionally I think they are both very modern technologies

    • @mrinaltantubai7341
      @mrinaltantubai7341 6 месяцев назад

      @@IsraelQuiroz Really thanks for replying..😊

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

    configuration or codes in SampleDatabaseContext not showing in the video.

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

      i show you what my database looks like, just scaffold you database to create your context and models using EF

  • @nicholassteveescalanteoliv3281

    Por favor puedes mostrarme la configuracion de DataBase, la usas en el insert.

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

      ensene mi db como al minuto 4 o que mas necesitas?

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

    It is too bad we cannot call stored procedure that produce query of joined table, is it happened you already figure out the way?

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

      yeah it's really frustrating, i just use other packages for doing that, i don't think ER7 fixed that either

  • @SaifulIslam-ic8wo
    @SaifulIslam-ic8wo Год назад

    Please upload a video to call stored procedure that produces query of joined table.

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

    bro can you make a video on how to call stored procedures from mysql and efcore 7 web api

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

      Thank you for the comment, i dont believe much if anything has changed with how u call stored procedures from EF6 to EF7 they only made some changes with how i think the tables are mapped in EF7 but thats all

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

    So why you using interface?
    I mean what benefits

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

      I highly recommend for you to look into composition.

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

      watch my Repository Pattern video :)

    • @user-ii2oo4li1d
      @user-ii2oo4li1d 11 месяцев назад

      interface give you the ability to change the service more easy without deal with the classes who use the "service".
      lets say you got the Players list from sql and after a while you want to get them from Elastic search so the only change you need to do is to change in "addScope" (and write the service of course)

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

    It's really cool bro.
    But why you call it Soccer, it's Football....