I am wondering myself, how I should design my database scheme (in terms of efficiency and visuality).
I am developing a ASP.NET Core application with Angular 2 and I am using Entity Framework Core ("Microsoft.EntityFrameworkCore": "1.0.0"
), since its my favourite ORM. I definitely prefer the SQL Server 2012, but if there are better options for designing my scheme available for other database management systems, I could switch to something else like PostgreSQL.
EntityFrameworkCore however doesn't support designing the DataContext (with all its POCO classes) with the EDMX designer anymore.
Can you give me any advice how I can design my database visually and automatically generate my POCO classes (and maybe also my TypeScript classes)?
Can you recommend me a good tool for designing my scheme? (At least more convenient than SQL Server Management Studio. I liked the EDMX designer)
Since the latest changelog (18.0 Preview 7) of SQL Server Management Studio announced, that Database Diagrams are deprecated, I am really in need of an alternative to visualize my databases, as soon as possible.
Since someone might stumble upon this question and no one provided an answer for my question, yet... Here you go: VS Extension: Entity Developer ORM Designer for LINQ to SQL
From the SSMS 19.1 Changelog:
Database diagrams were added back into SSMS.
If you prefer to start with the database, you can use whatever design tools you find most useful for whichever database platform you prefer to create the database, and then use EF commands to scaffold your model and context from the database. You can execute commands from the Package Manager Console just as with migrations in previous versions of EF:
Scaffold-DbContext "Server=yourServer;Database=yourDb;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models
The official documentation covers reverse engineering a model from an existing database
You can scaffold DbContext with enities using dotnet ef dbcontext scaffold
command from terminal (console). So you can design DB in whatever way you want and then run scaffold command and you'll get your generated DbContext and classes.
Here's documentation on command: https://docs.efproject.net/en/latest/miscellaneous/cli/dotnet.html#dotnet-ef-dbcontext-scaffold
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With