Out of good design practice and organization开发者_运维技巧, in which project should a local development SQL database be in a web based application?
I'm just starting my assignment so I currently have 'CompanyName.Web.UI' and 'CompanyName.Domain' projects setup. Im using LinqToSql and creating my database from POCOS, meaning I'll have to create some code to generate the DB from my domain model.
I.e.
DataContext dc = new DataContext(connString);
dc.GetTable<TableType>();
dc.CreateDatabase();
If you are using SQL Express the database file is usually stored in the special App_Data
folder in the web application and the connection string configured in web.config.
精彩评论