Scaffold Existing Database - Entity Framework Core | Trevoir Williams

Поділитися
Вставка
  • Опубліковано 15 гру 2024

КОМЕНТАРІ • 22

  • @TrevoirWilliams
    @TrevoirWilliams  3 роки тому

    Full Course: Entity Framework Core - A Full Tour (.NET 5 and up)
    Udemy: www.udemy.com/course/entity-framework-core-a-full-tour/?referralCode=AE4C8876B2B444EF9D22
    SkillShare: skl.sh/3wTSKdl

  • @abtech8355
    @abtech8355 2 місяці тому +1

    Nice , simple and perfect

  • @ciminoce
    @ciminoce 8 місяців тому +1

    Hi how can I do to modifying my domain after a scaffolding, like in EF? I coud not find something like "-IgnoreChanges"...

    • @TrevoirWilliams
      @TrevoirWilliams  8 місяців тому +1

      You need to run the scaffolding command again with a -force flag so that it will overwrite the existing files.

  • @russellmunro
    @russellmunro 3 роки тому +1

    Thanks for the info it was very helpful. (Though I still cant believe they killed edmx) Also, I could listen to your fabulous accent say "Annotation, relational, collation" (6:37) alll day long. :D

    • @TrevoirWilliams
      @TrevoirWilliams  3 роки тому

      Hahaa...I am glad you loved the info and the accent.

  • @123456paulo1
    @123456paulo1 2 роки тому +1

    hello trevoir, nice work!
    do u know some way to get all db data and generate a seed on ef?

    • @TrevoirWilliams
      @TrevoirWilliams  Рік тому

      I do have a lesson showing code first and data seeding.

  • @MyGreenpotato
    @MyGreenpotato 2 роки тому +2

    Perfect!

  • @webdevguy_
    @webdevguy_ 3 роки тому +1

    Travoir this came at the perfect time for the project I'm working on! Exactly what I need. My credit card is still waiting for your next udemy course. You are one of my favorite instructors. Thanks for all you do! :-)
    Where is the rest of this football course though? Or is the a clip from an upcoming udemy course?

    • @TrevoirWilliams
      @TrevoirWilliams  3 роки тому

      Perfect! I'm glad that the timing was good for you. Yes it is a snippet from an upcoming course and you will be notified of it's release ASAP.
      Thanks for the support, it means a lot.

    • @webdevguy_
      @webdevguy_ 3 роки тому +1

      @@TrevoirWilliams yeah I noticed the separate Domain project. hehe :-)

    • @TrevoirWilliams
      @TrevoirWilliams  3 роки тому

      @@webdevguy_ haha...phasing it in man..

  • @jeffsherman9638
    @jeffsherman9638 Рік тому +1

    Where is all of the data it extracted from the database?

    • @TrevoirWilliams
      @TrevoirWilliams  Рік тому +1

      Scaffolding doesn't extract data. It only models the database structure in code.

    • @jeffsherman9638
      @jeffsherman9638 Рік тому

      @@TrevoirWilliams what method can be used to extract data and create models from a existing database (like Scaffolding does to create just the database)?

    • @TrevoirWilliams
      @TrevoirWilliams  Рік тому +1

      @@jeffsherman9638 I am still unsure what you mean by extract data. You only extract data when you are backing up or migrating the database. Using EF Core, the application will manipulate the data based on the models generated by the scaffolding.
      Maybe if you explain what your expectations
      are, then I can give a better response to your scenario.

    • @jeffsherman9638
      @jeffsherman9638 Рік тому

      @@TrevoirWilliams when i create my first MVC project, I constructed the model classes first and then entity created the database. Then I populated the database with data, constraints. What I would like to do now is have entity go back and recreate the database model to include all of the data, the new constraints and authentication info. That way, If for some reason the database gets erase or changes, I can "reset" the entire database. If I want to demo the project and someone changes the database, I can reset it back to the default database with all of the data the new constraints and authentication info. I notice that backing up the database doesn't do that.

    • @TrevoirWilliams
      @TrevoirWilliams  Рік тому

      @@jeffsherman9638 I got you. So EF Core is an ORM, and its primary focus is to handle data transactions. It models the database and manipulates the data afterward.
      You can seed your database with default data and use ef core to build the database with this default (or seeded) data as needed. This way, you can always remove the database after a demo and then recreate it with the default values for the next one.
      I hope this method suits your needs.