locked
Can I use MySQL views as source for Entity Framework DB first approach? RRS feed

  • Question

  • User283528319 posted

    hi,

    Can I use MySQL views as <g class="gr_ gr_8 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar only-ins replaceWithoutSep" id="8" data-gr-id="8">source</g> for Entity Framework DB first approach?

    Friday, February 8, 2019 4:43 PM

All replies

  • User475983607 posted

    Can I use MySQL views as source for Entity Framework DB first approach?

    Yes, the docs cover the details.   Post your code if you need help debugging.

    https://docs.microsoft.com/en-us/ef/core/modeling/query-types

    Friday, February 8, 2019 6:41 PM
  • User283528319 posted

    I am just wondering I converted 40 tables and 14 view <g class="gr_ gr_37 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" id="37" data-gr-id="37">db</g> using EF.

    but none of the views converted did I miss something? like an option?

    Friday, February 8, 2019 6:50 PM
  • User2053451246 posted

    I am just wondering I converted 40 tables and 14 view db using EF.

    but none of the views converted did I miss something? like an option?

    Not sure if this is your problem but EF does not create stuff for views that don't have a unique key for each row.

    Friday, February 8, 2019 7:02 PM
  • User475983607 posted

    fatihbarut

    I am just wondering I converted 40 tables and 14 view db using EF.

    but none of the views converted did I miss something? like an option?

    Please read the linked documentation or provide the steps to reproduce the issue.  Include any CLI commands, migrations, DDL, and Fluent API configuration.  

    Friday, February 8, 2019 7:33 PM