help me to start my first wcf project

Posted by Ermahesh2009 under WCF on 9/27/2013 | Points: 10 | Views : 1897 | Status : [Member] | Replies : 5
Dear All

I am new in wcf and i am planing to use it in my project . I want to make service in that way so i can use it in many projects or different environments .
I have 2 doubt .
[1]. How to convert my classes like accounts , purchase , sales , Inventory etc. to Wcf services .
In Wcf can i write insert/Update/Delete operation on database ?
In wcf can i retrive data from database

[2]. In Wcf service can i interact with database if yes then how to pass/set connection string .

please reply in details or send me link or a project so i can understand .

Thanks in advance
Er. Mahesh Nagar
Simply Making Efforts




Responses

Posted by: Nismeh on: 9/27/2013 [Member] Starter | Points: 25

Up
0
Down
1. You have to create your own class members for respective classes. You can use these members as part of dataset and can fire LINQ on it. Similarly you can have database's data using LINQ.

2. WCF is all about configuration. If you know LINQ than it will be much easier for you. So start with ur LINQ and Web Services concepts.

IT KNOWLEDGE IS APPLIED KNOWLEDGE
So Just Do It

Ermahesh2009, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Bandi on: 9/27/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down
Refer these link for making classes as services:
http://www.codeproject.com/Articles/18589/Writing-your-first-WCF-Service

Create First WCF Web API App
http://www.locked.nl/my-first-wcf-web-api-service-2

http://www.bloggedbychris.com/2011/06/15/converting-visual-studio-2010-class-library-project-to-wcf-class-library-project/

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Ermahesh2009, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Bandi on: 9/27/2013 [Member] [MVP] Platinum | Points: 25

Up
0
Down
for connections,
http://www.dotnetfunda.com/interviews/exclusive/show/776/can-we-see-simple-wcf-example-of-transactions-using-sql-server-databas

For CRUD( update, insert, delete, retrieve ) operations
http://www.codeproject.com/Tips/468354/WCF-Example-for-Inserting-Deleting-and-Displaying

Mark This Response as Answer
--
Chandu
http://www.dotnetfunda.com/images/dnfmvp.gif

Ermahesh2009, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Allemahesh on: 9/27/2013 [Member] [MVP] Silver | Points: 25

Up
0
Down
You can go through below link:-

http://www.webcodeexpert.com/2013/08/wcf-service-to-bindinserteditupdatedele.html#.UkVi2oaGpKA

Happy Coding,
If it helps you or directs U towards the solution, MARK IT AS ANSWER

Ermahesh2009, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ermahesh2009 on: 9/27/2013 [Member] Starter | Points: 25

Up
0
Down
Thanks all its very helpful its great .
please help me in this scenario same service using for multiple projects , and each project have own database . so when each project calling service then how service know to connect which database .

Thanks in advance

Ermahesh2009, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response