I'm using webMatrix, to develop an example in JqueryMobile, I'm having the following error
@{
Layout="~/shared/_Layout.cshtml";
Page.Title = "Home";
Page.Header = "Categorias";
var db = Database.Open("Northwind40.sdf");
var sql = @"SELECT [CATEGORY ID] AS ID, [CATEGORY NAME] AS NAME FROM CATEGORIES
ORDER BY [CATEGORY NAME]";
var data = db.Query(sql);
}
<div data-role="content">
<ul data-role="listview" data-inset="true" data-theme="d">
@foreach(var item in data){
<li><a href="/Category/@item.ID">@item.NAME</a></li>
}
</ul>
</div>
Error Message:
Connection string "Northwind40.sdf" was not found.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: Connection string "Northwind40.sdf" was not found.
Source Error:
Line 3: Page.Title = "Home";
Line 4: Page.Header = "Categorias";
Line 5: var db = Database.Open("Northwind40.sdf");
Line 6: var sql = @"SELECT [CATEGORY ID] AS ID, [CATEGORY NAME] AS NAME FROM CATEGORIES
Line 7: ORDER BY [CATEGORY NAME]";