Solved

how to expose existing data access class in c# as a webservice

Posted on 2013-02-03
2
226 Views
Last Modified: 2013-02-06
i have a data access class, which calls certain stored procedures and get data from the sql server database. Can I access all the methods in this class via webservice?
0
Comment
Question by:mmalik15
2 Comments
 
LVL 74

Accepted Solution

by:
käµfm³d   👽 earned 400 total points
ID: 38849456
Sure. It sounds like you've created yourself an n-tiered architecture. You just need to create a layer that is called from within the service and which accesses your existing code. You would probably want to wrap your existing code up as a library (DLL) and just reference it within your service project.
0
 
LVL 1

Assisted Solution

by:mgbm_it
mgbm_it earned 100 total points
ID: 38854482
the way I would do this would be to create a LINQ to SQL class, add all tables to it then create functions which will perform all required operations then create web service that contains all functions.

there is not shortcut for this... you need to get your hands dirty a little bit :)
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now