Jump to content

Can't be found in context


c2145

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 comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...