Entity Framework 7 - JSON Columns

Поделиться
HTML-код
  • Опубликовано: 11 окт 2024
  • SQL Server has allowed JSON columns for a while - now we can access them directly from C# through Entity Framework.
    Source code available at: github.com/Jas...
    Topics include:
    Defining JSON object with ToOne
    Defining JSON arrays with ToMany
    Querying on JSON properties
    The problem of querying JSON arrays
    Querying JSON arrays in SQL
    Emitting SQL directly in Entity Framework with FromSql
    Parameterizing SQL in Entity Framework
    Avoiding SQL injection attacks

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

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

    Which features of Entity Framework 7 have you been looking forward to most? Let me know.
    Source code available at: github.com/JasperKent/EF7-JSON-Columns
    Remember to subscribe at ruclips.net/channel/UCqWQzlUDdllnLmtgfSgYTCA
    And if you liked the video, click the 👍.

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

    Great tutorial, You always try to go deep into a subject. Thank you.

  • @IldarTagiev
    @IldarTagiev Месяц назад +1

    Very great videos, thank you

  • @vivekmahajan6752
    @vivekmahajan6752 4 месяца назад +1

    Great one :)

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

    Very well put together, thank you. Was there an update to this since we are now on ef core 8 and Microsoft released some enhancements in v8?

  • @10Totti
    @10Totti Год назад +1

    Thanks for your great videos, from what I've read though it is possible to update json columns.

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

      Yes, it's possible. I just didn't include it because it's just the same as any other update, once you configured the JSON column.

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

    Excellent tutorial 👍

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

    Excellent 👌

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

    can postgresql handle this as well, or just specific to SQL Server?

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

      I'm not sure. Postgres does support JSON columns (www.postgresql.org/docs/current/datatype-json.html#:~:text=PostgreSQL%20offers%20two%20types%20for,sets%20of%20values%20as%20input.) and so it should be possible to access them from EF in this way. However, any feature relies on being implemented by the Postgres EF provider, and that doesn't always happen :(.