How to Update and Delete with Entity Framework Core

Поделиться
HTML-код
  • Опубликовано: 13 фев 2023
  • 💻Get the source code: go.dotnetacademy.io/howtoefup...
    Entity Framework Core 7 introduced a couple of new powerful APIs that finally allow you to perform database updates and deletes in a very efficient way.
    In this video I'll give you all the details.
    🔥Become a Senior C# Backend Engineer: juliocasal.com/courses
    🗺️Get My Free .NET Backend Developer Roadmap: juliocasal.com/roadmap
    Join me on Patreon: / juliocasal
    Follow me on LinkedIn: / juliocasal
    Follow me on X: x.com/julioc
    #entityframework #entityframework #dotnet #aspnetcore #aspnet #dotnetcore

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

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

    Thank you so much. I learnt something new today and I'm immediately using it in a new project Im coding now.

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

    Nice video Julio! Thanks for this content! 💻

  • @Francisco-Gutierrez
    @Francisco-Gutierrez Год назад

    it is much efficient now, thanks for the video.

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

    That's so verbose for Update. Even in our high-traffic applications I don't see us using that at all unless all those SetProperty extensions can be replaced with a single changed entity. Especially when all we're doing is using Automapper to map the changes, attaching the changed object to EF, setting the state to modified and saving that. We don't touch individual properties at all.

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

    Excellent

  • @akbaralimajeed
    @akbaralimajeed 11 месяцев назад +1

    Excellent video ): , can you pls show us how to upsert related items in child tables using this new way ( one to many relationship entities )

    • @juliocasal
      @juliocasal  11 месяцев назад +1

      Don't have an answer for that one yet, but I'll investigate.

    • @akbaralimajeed
      @akbaralimajeed 11 месяцев назад

      ​@@juliocasal Thanks for the response, please keep me posted.😃

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

    Now that the context is out of sync... how do you correct that?

  • @HernanIannella
    @HernanIannella 2 месяца назад

    dbContext.Entry(existingGame)
    .CurrentValues
    .SetValues(updatedGame.ToEntity(id));