Solved

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

Posted on 2013-02-03
2
228 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 75

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

803 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