Solved

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

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

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

830 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