.NET Framework Bookmark and Share   
 index > Windows Communication Foundation > Creating Schema in WCF
 

Creating Schema in WCF

Hi every one i am new to WCF and my question is

I need to create the complete schema of my database in WCF and pass the schema to the winform application, there i will be assigning to a dataset so it will be like a virtual database for me so i will be doing all the transactions in the dataset and finally i will up date it with the database

Thanking you,
Dilip
Dilip Varma
Hi Dilip,
You need to have a basic architecture in place. Presentation |Service layer|Business Layer|Data Access Layer | Database. Depending on the complexity of the project you may choose to merge layers in there, but its preferable to basically keep it loosely coupled like that.

You need to break down your database schema into entities (business and/or data contracts) and use them as state-objects to pass them to presentation or whoever requires it. You should check viability of ADO.net entity framework-

http://channel9.msdn.com/shows/Going+Deep/ADONET-Entity-Framework-What-How-Why/

And you can use the above entities from ADO.net entity framework as datacontracts in WCF, in fact they are marked with WCF data contract attribute anyways.

In a SOA, dataset is discouraged because its not interoperable. But as far as you can see, if you don't need interoperability (Java or other technologies calling .net services). You should be fine to use DataSets as Data Contracts anyways.




Thanks,
-Phani

Phani_tpk
Hi,

In terms of your first post, I think you could use linq to entity to do the database manipulation on your service side and return the query result or update nortification to your client side.
http://msdn.microsoft.com/en-us/library/aa697427(VS.80).aspx

This operation need wcf and client side to establish a transaction session.
http://msdn.microsoft.com/en-us/library/ms730266.aspx

By the way I don't really understand which you mean by generic Database and Db Command, and what do you want to use them for.

Thanks
Binze
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Bin-ze Zhao
Hi Dilip,
You need to have a basic architecture in place. Presentation |Service layer|Business Layer|Data Access Layer | Database. Depending on the complexity of the project you may choose to merge layers in there, but its preferable to basically keep it loosely coupled like that.

You need to break down your database schema into entities (business and/or data contracts) and use them as state-objects to pass them to presentation or whoever requires it. You should check viability of ADO.net entity framework-

http://channel9.msdn.com/shows/Going+Deep/ADONET-Entity-Framework-What-How-Why/

And you can use the above entities from ADO.net entity framework as datacontracts in WCF, in fact they are marked with WCF data contract attribute anyways.

In a SOA, dataset is discouraged because its not interoperable. But as far as you can see, if you don't need interoperability (Java or other technologies calling .net services). You should be fine to use DataSets as Data Contracts anyways.




Thanks,
-Phani

Phani_tpk
how to create generic Database and Db Command objects using c#.net
Dilip Varma
Hi,

In terms of your first post, I think you could use linq to entity to do the database manipulation on your service side and return the query result or update nortification to your client side.
http://msdn.microsoft.com/en-us/library/aa697427(VS.80).aspx

This operation need wcf and client side to establish a transaction session.
http://msdn.microsoft.com/en-us/library/ms730266.aspx

By the way I don't really understand which you mean by generic Database and Db Command, and what do you want to use them for.

Thanks
Binze
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
Bin-ze Zhao

You can use google to search for other answers

Custom Search

More Threads

• What basic technology should I have if I want to learn WCF?
• Need your .NET Framework 3.0 apps for backward app compat testing for Orcas Beta2
• WCF Worker Thread Hangs on WPF Client .
• Can't connect to TcpBinding endpoint on IIS7 hosted service on Vista
• Pros & Cons of host types
• Consume a wcf service from a windows service
• Problem with endpoint
• TCP error code 10061: No connection could be made because the target machine actively refused it.
• svcutil /serviceName : Exception has been thrown by the target of an invocation
• WCF Client needs .net 3.0 if we are consuming it as web service ??