开发者

MVC .NET Project with LinqToSql- In which project should the local database instance be?

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜