简体   繁体   中英

Calling methods written in class library project from webforms in ASP.net using LINQ to entities

I have a class library project where i have written my methods that retrieve data from database using entity framework. But I don't know how to call that methods from my UI webforms backend. Please Help.

Build your class library and find the dll in bin folder . And add this dll as reference in another Project which you want to use it in . Declare this reference as namespace and you can call your method.

You can reference this Creating C# Class Library (DLL) link , this example show how to create dll and reference this from console application.

But you can use this example in your Asp.net webfrom in the same way .
Hope it's helpful for you :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM