What database is used in the SPA tutorial RRS feed

  • Question

  • User-1034524349 posted


    BTW, The tutorial I’m referring to is this one: http://www.asp.net/single-page-application

    I have the following connection string in my web.config but I’m not sure what it means, I’ve only ever used SQL Server and SQL Server Express as databases, is this a reference to the compact database that ships with VWD?

    <add name="SPADemoContext" connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=aspnet--2012418173310;Integrated Security=true" providerName="System.Data.SqlClient" />

    If so, where is it located?



    Wednesday, April 18, 2012 7:41 PM

All replies

  • User1751268424 posted

    Hi Mike,

    In SQL Server 2012 is introduced a new database called LocalDB, it is smaller than SQL Express edition. the data base name is also xxxxx.mdf and can be used on SQL Express 2012 and rSQL 2012 standard.

    This localDB is automatically install on VS 11 beta, and use on SPA and other project template, the location of db is under username folder. For example my user id is j.siahaan, the folder is c:\Users\j.siahaan and then database is located and named automatically when we create a new project. But we can modified it. on sample attached I commented the automated connectionString and I change from localDB to SQL Express 2012.   

        <!--<add name="AppDbContext" 
             connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=aspnet-DeliveryTracker-201242195131;Integrated Security=true" 
             providerName="System.Data.SqlClient" />-->
        <add name="AppDbContext"
         connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=aspnet-DeliveryTracker-201242195131;Integrated Security=true"
         providerName="System.Data.SqlClient" />

    At the code, database file name are: "aspnet-DeliveryTracker-201242195131.mdf" and it's log "aspnet-DeliveryTracker-201242195131_log.ldf"  located under "C:/Users/j.siahaan" folder, again j.siahaan is my user name on my computer. I copy these two files to other folder, and I attached them to my SQL Express 2012. We can not use the previous version of SQL Server.  This is working fine, and I am still working on it.

    Hope this can answer your question.

    Wednesday, April 18, 2012 8:29 PM
  • User-221707163 posted

    Here is an example for Asp.net, SQL Server and AngularJS


    Thursday, September 3, 2015 3:01 AM
  • User-2073147954 posted

    You can use any database by changing the connection string

    Saturday, December 5, 2015 10:44 AM