How to scaffold an ASP.NET Core API again when changes are made to a MS SQL database?
Greetings,
Is it possible to re - scaffold an ASP.net Core web api with the below command when changes are made to an existing table or when new tables are added? The framework is Entity.
Scaffold-DbContext"Server=yourserver.com;Database=<Your Database Name>;User Id=<Your Log In>; Password=<YourPassword>"Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models
I have created one table and scaffolded a working api, but now wondering if I need to make changes to the existing table (add a new column for example) or add new tables will the above command overwrite everything as needed or do I need to use a different command? I haven't experimented as thinking it might break and I will need to redo the API from scratch.
Thank you in advance and please let me know if you need more information!
0 comments:
Post a Comment