Entity Framework using MySQL (Database First) (EFCore)

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ม.ค. 2025

ความคิดเห็น • 25

  • @NayaneshPatelIT
    @NayaneshPatelIT ปีที่แล้ว +1

    Its very helpful for developed api in old .net core 3.1 after your guidance I have to upgrade to .net 5.0

  • @jpsgt502
    @jpsgt502 2 ปีที่แล้ว +1

    Thank you very much for this video. Very helpful. Greetings from Guatemala, Central America

    • @DataVids
      @DataVids  2 ปีที่แล้ว

      Welcome! Beautiful country.

  • @scottjibben4862
    @scottjibben4862 2 ปีที่แล้ว +3

    --no-pluralize --use-database-names
    Are useful options in the "dotnet ef ... scaffold" command if you want to keep/use the database table/column names as defined in the database.

    • @DataVids
      @DataVids  2 ปีที่แล้ว +1

      Thank you so much for adding this! My favorite comments are those that add to the value of the video / help the other watchers. Also, thanks for stopping by to check out data vids!!

  • @zensic
    @zensic 2 ปีที่แล้ว +1

    Thank you! This was helpful to me!

    • @DataVids
      @DataVids  2 ปีที่แล้ว

      I'm so glad!

  • @MuhammadKhalid-hh8bu
    @MuhammadKhalid-hh8bu 3 ปีที่แล้ว +1

    sir how we call MySQL stored procedure in EF core, with parameter and without parameters?

    • @DataVids
      @DataVids  3 ปีที่แล้ว +1

      Its pretty much the same as in SQL server. Here is a video on how to do it in SQL server: th-cam.com/video/fWJwVOeS3o4/w-d-xo.html
      Or if you prefer, here is a stackoverflow discussing it in MySQL as well:
      stackoverflow.com/questions/14264750/how-to-call-stored-procedures-with-entityframework
      (The first answer when you scroll is similar to how I do it in SQL with my video above)
      Best of luck, Muhammad Khalid!

    • @MuhammadKhalid-hh8bu
      @MuhammadKhalid-hh8bu 3 ปีที่แล้ว

      @@DataVids thanks working, I appriciated...

  • @monicasnyder5510
    @monicasnyder5510 3 ปีที่แล้ว +1

    Thanks - this is super helpful!

    • @DataVids
      @DataVids  3 ปีที่แล้ว

      Glad to help!

  • @rezamakvandi7404
    @rezamakvandi7404 3 ปีที่แล้ว +1

    Thanks for your amazing video. Is there any way to create db models inside Models folder automatically with that command?

    • @DataVids
      @DataVids  3 ปีที่แล้ว +1

      @reza makvandi Yes! All you have to do is append -o Models to put it in the Models folder. This should work even if the Models folder already exists. For example: dotnet ef dbcontext scaffold "Server=localhost;User=root;Password=MyPassword;Database=partyvote" "Pomelo.EntityFrameworkCore.MySql" -o Models

  • @kabadajabt
    @kabadajabt 3 ปีที่แล้ว +1

    Thanks for your video.
    I have a problem to connect to my database because I have to use SSH. Can you help me how to solve this problem?

    • @DataVids
      @DataVids  2 ปีที่แล้ว

      I have not done this before, but a quick google search I found this article, though its not for entity framework so you will have to make adjustments: mysqlconnector.net/tutorials/connect-ssh/

  • @mihailojovanovic2197
    @mihailojovanovic2197 2 ปีที่แล้ว +1

    How did you create Startup.cs file

    • @DataVids
      @DataVids  2 ปีที่แล้ว

      Well it first gets created by going to new project and choosing a dotnet / dotnet core web project (just not a dotnet framework project). Then a couple times during the video you will see I edit this startup.cs to add things/change parts of it.

    • @OcasoProtal
      @OcasoProtal 2 ปีที่แล้ว

      In .NET 6 there is no Startup.cs anymore. But you can maybe try docs.microsoft.com/en-us/aspnet/core/migration/50-to-60?view=aspnetcore-6.0&tabs=visual-studio

  • @PIMARINE
    @PIMARINE 3 ปีที่แล้ว +2

    When You wear Your shirt and I wear my shirt, does it feel like we're together?🤣🤣🤣 Datavids4life.

    • @DataVids
      @DataVids  3 ปีที่แล้ว +1

      haha yes, yes it does. Now we need hats!

  • @waqasjavaid9274
    @waqasjavaid9274 2 ปีที่แล้ว

    how to run developer PowerShell in VS

    • @DataVids
      @DataVids  2 ปีที่แล้ว

      Create a powershell script project, or you can get the powershell tools for visual studio extension.

  • @SLCODEGEN
    @SLCODEGEN 2 ปีที่แล้ว +1

    thankx

    • @DataVids
      @DataVids  2 ปีที่แล้ว

      You are welcome!