![]() I have to issue a lot of commands to scaffold the database, and they rebuild my giant project every single time.Īnd, of course, the other option is to generate everything in one go, and deal with User1, User2, User3, User4 classes. There are several missing properties, and my code is full of manual joins and duplicated connections (select in one schema, read the results, select again in other schema), forcing me to remember where to join in every table and making my code way slower, instead of building a single query through property navigation.īecause of (2), I can't use LazyLoading Proxies between schemas. I have some tables that have relationships between schemas, and the scaffold operation does not generate navigation properties for the auto join. This is very ugly, and I don't know if there is any optimization magic under the hood, it seems that it instantiate 15 Entity classes in every API request (and we have the need to be extremely responsive). (I'm sure I'm missing something, I can't be the only one who has multiple schemas.) The classes would also have to be in a namespace for each schema. client Username=dbuser Password=dbpassword" \ my_admin Username=dbuser Password=dbpassword" \ Multiple dotnet commands for each schema would be nice, sort of like this: my_admin.User creates Entities/MyAdmin/User.cs.client.User creates Entities/Client/User.cs.Index column dbo.BurnerHistory belongs to index PKBurnerHistory on table BurnHistIdx which is not included in the selection set. I haven't seen an scaffolding option that creates a subdirectory for each schema and places the schema's generated classes into that subdirectory: Scaffold-DbContext 'Servermysrv Databasemydb User Iduname passwordpword' -OutputDir Models -Table Burner And I get the errors I had before along with this error. These classes are in the same namespace and not differentiated in any meaningful way. my_admin.User creates Entities/User1.cs.If there is a table in one schema and a table with the same name in a different schema, the entity classes that are create are Class.cs and Class1.cs in the output folder a specified (Entities): I'm reverse engineering the database and I'm getting issues with the results. There are a number of schemas in the database. ![]() I'm migrating an existing postgresql database to be used with.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |