Closed stewart-r closed 8 years ago
Thanks for this! Looks like you managed to get up and running with it in the end :-) Let me give it a quick check and then merge in - looks good.
Yeah, got there in the end :-). Had a moment of joy yesterday when, after MUCH fiddling, I first managed to hit a break point!
Thanks for your guidance - it's much appreciated
If you hit a breakpoint then that's more than I've ever managed to do :-)
Proposed resultion for Issue #64
Added a 'checkConnectionString' function to Configuration.fs to check the validity of a connection string - I couldn't find a 'nice' way to do this in the Azure SDK so I just checked if an arbitrary table exists knowing that the SDK would throw an exception if the connection string was invalid.
I have also cached the validation result for each connection string in a Dictionary to prevent repeated calls - it is likely that if a a connection string is valid then it will remain so and, similarly if it is not valid it will remain so, no? I'd hope to prevent uneccesary traffic repeatedly verify the connection string. The validateConnectionString function wraps checkConnectionString using this cache.
I call into validateConnectionString from the buildTypes function in AzureTypeProvider.fs immeadiately after the connection string is built. We 'failwith' an error message wrapping the original exception if the connection string cannot be validated or continue with the existing code on Success.
This causes a 'red squiggly' in Visual Studio with a meaningful error message immeadiately after entering an invalid connection string