Project needs a database connection ?

Aug 12, 2014 at 3:36 AM
Hi,

I downloaded the code and tried to run.

KsigDo.Web.MvcApplication.InitDatabase() in g:\MvcSignalRKO_TaskDemo\KsigDo\KsigDo.Web\Global.asax.cs:51

using (var context = new KsigDoContext())

Is failing because there is no connectionstring in the web.config
there is something commented out in web.debug.config
Am I supposed to use that ?

Is there a sql script to create the tasks table ? ( or is it code first creating the DB and the table ? )

Thanks, LA Guy
Aug 12, 2014 at 4:51 AM
had to add a connection to web.config for EF CodeFirst to locate the sql server instance to use

<configuration>
<connectionStrings>
<!--NOTE: don't create the KsigDo DB , let EF CodeFirst do it, just point to the DB--> <add name="KsigDoContext" providerName="System.Data.SqlClient"
connectionString="Data Source=.;Initial Catalog=KsigDo;Integrated Security=True"/>

</connectionStrings>

Not sure why it was missing from the web.config ?

Thanks, LA Guy