3 ms·
It always bothers me how things could be automated better if people just put in a little more thought. For example, where I work, we use both entity framework
by meuk 8y ago
It always bothers me how things could be automated better if people just put in a little more thought.
For example, where I work, we use both entity framework and raw SQL scripts. A common chore is to delete all migrations, delete the database, run "add-migration SetupDB", "update-database -script", and save the script (with some added boilerplate) in a specific folder
However, the "update-database -script" command does not pipe the script to output, but instead opens a new window in VS with the script. This is part of the reason why I am not a fan of Microsoft/Windows: relying on a GUI makes automation so much harder.
- yurishimo 8y agoAren't there ways to automate this though? Even if it's not 100%, maybe you could get the first parts, and then get everything setup so you only need to click a window and then "select all, copy, tab, paste" to finish. I'm sure with some clever thought, you might even be able to use a GUI scripting program to work with the VS window. I'm thinking of a series of keyboard shortcuts to reliably set the state of the VS window to where you can script a mouse click in the appropriate spot and then more keyboard shortcuts to copy and save the output.