I worked through the WingTip Toys using Visual Studio 2012. This was my first experience at using CodeFirst. I have always used DatabaseFirst before. As I worked through it I had switched from WingTip toys to using HuronWood for my Project and Database name. Now I want to switch from using localDB for my database and use a MSSQL database on a server.
I am trying to figure out where in the CodeFirst the name of the database is being set.
In the Wingtip example code their model and corresponding webconfig connections looks like this:
using System.Data.Entity;
namespace WingtipToys.Models
{
public class ProductContext : DbContext
{
public ProductContext()
: base("WingtipToys")
{
}
public DbSet<Category> Categories { get; set; }
public DbSet<Product> Products { get; set; }
public DbSet<CartItem> ShoppingCartItems { get; set; }
publ ...
Go to the complete details ...