Quantcast
Channel: ADO.NET, Entity Framework, LINQ to SQL, NHibernate
Viewing all articles
Browse latest Browse all 1698

Entity Framework - Change database name

$
0
0

Hi, I tried the tutorial here - https://docs.microsoft.com/en-us/aspnet/web-forms/overview/getting-started/getting-started-with-aspnet-45-web-forms/

After I change my database name, example "mydatabase.mdf" and in my web.config, I also set "mydatabase" as my connection name value and also in my dbcontext, I also change my code to:

    public ProductContext()
      : base("mydatatabase")
    {
    }

My application works, but when I view my server explorer (I use localdb), there are 'two' mydatabase and auto-generated tables were created inside mydatabase (WingtipToys), instead of mydatabase. Why? or How do I remove the text "WingtipToys"?


Viewing all articles
Browse latest Browse all 1698

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>