This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi I'm trying to figure out how to create a new database when starting up an MVC4 web site. So far, I have managed to create a CE database while running the migrations but I dont seem to be able to do create an express db as easily:
Problems: 1) the connection string may or may not contain the path to the database file. If it did, or I new thins some other way then I could have an empty mdf file in the project resources and just write this out to disk (which would work well for a auto attach db in the app_data folder). 2) I cant easily debug this stuff as it's called during the app_start and the debugger doesn't seem to attach soon enough to catch any break points here. I'm sure someone must have done this already ... ? Ta |
|
|
The way we do it in the designer is to connect to SQL Server using the standard SqlConnection, specifying |
|
|
I guess I was hoping that LightSpeed would create the database for me, given that it will create the schema using migrations. Version 5? :} |
|
|
This seems to work well enough:
|
|