none
How do I use the Scafford-DbContext for duplicate tables? RRS feed

  • Question

  • I've used the Scaffold-DbContext command to scaffold a database on my machine. I want to do the same thing on a SQL Server database on the network. Only problem is that there are duplicate table names on the server. So, how do I handle this?


    Rod

    Thursday, February 7, 2019 8:52 PM

Answers

  • I believe so: https://github.com/ErikEJ/EFCorePowerTools/issues/128#issuecomment-439692246 

    Please mark as answer, if this was it. Visit my SQL Server Compact blog http://erikej.blogspot.com

    • Marked as answer by Rod at Work Monday, February 11, 2019 4:07 PM
    Friday, February 8, 2019 4:37 PM

All replies

  • EF Core power tools allows you to select the tables to be generated.

    Please mark as answer, if this was it. Visit my SQL Server Compact blog http://erikej.blogspot.com

    Friday, February 8, 2019 11:40 AM
  • EF Core power tools allows you to select the tables to be generated.

    Please mark as answer, if this was it. Visit my SQL Server Compact blog http://erikej.blogspot.com


    I'll get those EF Core Power tools. But looking at the website I found for it, I'm wondering if it will let me rename a class, which would be associated with a table, from the second database?

    Rod

    Friday, February 8, 2019 4:34 PM
  • I believe so: https://github.com/ErikEJ/EFCorePowerTools/issues/128#issuecomment-439692246 

    Please mark as answer, if this was it. Visit my SQL Server Compact blog http://erikej.blogspot.com

    • Marked as answer by Rod at Work Monday, February 11, 2019 4:07 PM
    Friday, February 8, 2019 4:37 PM
  • Where does that efpt.renaming.json file go? At the root of the VS project, or in the Model folder where the new dbContext file and associated table files go?

    Rod

    Friday, February 8, 2019 5:40 PM
  • I ran the Reverse Engineer option in EF Core Power Tools. I see that it put efpt.config.json at the root of the Vs project.  I presume that efpt.renaming .json goes there, too. Is that correct?

    Rod

    Friday, February 8, 2019 11:07 PM
  • Yes, that is correct

    Please mark as answer, if this was it. Visit my SQL Server Compact blog http://erikej.blogspot.com

    Saturday, February 9, 2019 7:33 AM