Jump to content

Can't be found in context


Recommended Posts

Hi im new and i was just going through the ASP.NET tutorial but i stumbled across an error.I am up to part IV Databases. I've done everything correctly but when i click run and click on "Data"it gives me this.

Server Error in '/' Application. Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS0103: The name 'Database' does not exist in the current context Source Error: Line 1: @{Line 2: var db = Database.Open("SmallBakery"); Line 3: var selectQueryString = "SELECT * FROM Product ORDER BY Name";Line 4: } Source File: c:\Users\'6yweg\Documents\My Web Sites\Demo\ListProducts.cshtml Line: 2 Show Detailed Compiler Output: Show Complete Compilation Source: Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272

Could someone tell me how to get around this?

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...