Last post Apr 06, 2017 09:43 AM by ngaisteve1
Apr 05, 2017 02:54 PM|ngaisteve1|LINK
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:
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"?
Apr 06, 2017 06:39 AM|Jean Sun|LINK
Could you please share your web.config file here?
You can check the property of the Database by right click on the Database, click Property. Then a window shows the property of the Database will show, you can check the connection string of the database and other properties.
Apr 06, 2017 09:38 AM|ngaisteve1|LINK
Hi here you go:
<add name="mydatatabase" connectionString="Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\wingtiptoys2.mdf;Integrated Security=True"
Just wondering why in my web.config, i have wingtiptoys2.mdf but in my App_Date, my database name is mydatabase.mdf?
Apr 06, 2017 09:43 AM|ngaisteve1|LINK
Its okay. Somehow, I manage to solve already. Thanks.