1

I am creating a three tier website project. I am using Linq to sql class in my data-access-layer,all my sp's and tables are shown in DataAccessLayerCodeFile.designer.cs file,but when i make a instance of it in presentation layer,it successfully create the instance like this:

DataAccessLayer.DataAccessLayerCodeFileDataContext dbInstance = new DataAccessLayer.DataAccessLayerCodeFileDataContext();

But when i want to used dbInstance, it is not showing in intellisense and not showing classes and functions (sp's).i-e i want to call sp's from dbInstance., but i can't access it?Kindly guide me what i am missing?

Muhammad Ali
  • 853
  • 1
  • 10
  • 18

1 Answers1

1

In a Web site project, you must put the data classes in the project's App_Code folder or in a sub-folder of App_Code. If you include the data classes in a sub-folder of App_Code, the name of the sub-folder will be used as the namespace for the classes. In that case, you must provide that namespace when you connect to the data classes.While at the same time i have created a sample web application project, it does not allow me to do the same stuff,as far i research, link mention below explicitly stated the same procedure for web application project, but on reality it does not support to access the instance.

[http://msdn.microsoft.com/en-us/library/vstudio/bb907587(v=vs.100).aspx][1]

Karim Musa
  • 378
  • 1
  • 2
  • 9