I created project LINQ To SQL. Added relational model data i.e Northwind. I right clicked on Nortwind database in catalog explorer and clicked on Reverse-Engineer Tables to Entity Definitions. Validate and generate code. I created one solution with one website in it. Added the project created by LLBLGEN. All that stuff of referencing is done. When wrote one piece of code which is pulling product name from product table and it gives the error you are looking at.
Invalid object name 'dbo.Products'.
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.Data.SqlClient.SqlException: Invalid object name 'dbo.Products'.
Source Error:
Line 20: select p;
Line 21: GridView1.DataSource = products;
Line 22: GridView1.DataBind();
Line 23: }
Line 24: }
Source File: c:\Projects\TestProjects\LLBGenTest\LLBLGen\WebSite1\Default.aspx.cs Line: 22
Attach zip contains, VS solution, website and LLBLGEN created project and LLBLProject as well.
Attachments
Filename |
File size |
Added on |
Approval |
LLBLGen.rar
|
288,761 |
23-Feb-2012 16:14.14 |
Approved |