• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 245
  • Last Modified:

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

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
mmalik15
Asked:
mmalik15
2 Solutions
 
käµfm³d 👽Commented:
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
 
mgbm_itCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now