What steps will reproduce the problem?
1. Setup Subsonic as usual
2. Add two providers to the app.config/web.config file (name them provider1
and provider2)
3. Make provider1 the default provider in then subsonicservice section
3. Let subsonic.exe generate your code with the following snippet:
sonic generate /out Generated
I would expect subsonic to generate only the code for the provider1 (which
is the default provider) and place the code in the "Generated" folder, like
it does if I have only one provider in my app.config/web.config file.
But sonic.exe creates two subfolders in the Generated folder
(Generated\provider1, Generated\provider2) and places the files for each
provider in it's own folder.
Even if I pass the /provider argument to sonic.exe:
sonic generate /provider /out Generated
the code is generated for both providers.
I could provide a patch, but can someone of the devs. (canofunk, rob)
please verify that the expected behaviour is correct, and it's a bug in
subsonic. Or is it intentionally that sonic generates the code for all
providers?
btw. If I use
sonic migrate
with passing the /provider argument, the right provider is taken for migration
In my environment I have setup 3 providers in one project, with 3 different
connectionstrings associated
- defaultProvider (for connecting to the live db)
- generationProvider (for code generation only)
- migrationProvider (for migration only - usally linked to test db)
and it doesn't make sense to generate the code 3 times.
(I know I could workaround this by adding the /config switch and maintain 3
app.config files, but I think the /provider arg should work, too)
Original issue reported on code.google.com by j.steinblock@gmail.com on 27 Apr 2009 at 1:25
Original issue reported on code.google.com by
j.steinblock@gmail.com
on 27 Apr 2009 at 1:25