Last post Jan 26, 2017 10:26 AM by kaushalparik27
Jan 26, 2017 06:42 AM|tangara|LINK
I am trying WCF and am following an online tutorial.
However, I am not sure about this DataContract class so I am turning my model class into this DataContract class.
So I just added annotation [DataMember] on top of the getter setter.
Since I have no experience in this, I just wanted to check if this is the way to do it ?
Cos in java we will have one which provided us with a default annotation and we can change accordingly.
I am using this WCF DataService 5.6.4 which looks like this below.
// NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IWCFService1" in both code and config file together.
// 26 Jan 2017
public interface IWCFService1
string InsertUserRequestFrom(RequestOrder rq);
Jan 26, 2017 10:09 AM|mohtshm|LINK
You are on right track, fearlessly do things little by little and keep checking and testing and when anything goes wrong ask here.
Jan 26, 2017 10:26 AM|kaushalparik27|LINK
I am not sure about this DataContract class so I am turning my model class into this DataContract class
Definitions of Code Patterns, Practices and Design architecture differs mouth to mouth. But it is important that you follow the way you would make easier for yourself to write code in your application. You may use model classes as DataContract as well, or
create different one, based on your application need.
Possibly, if application is small then you may use the same classes as entities/model classes and DataContract classes. On the other side, if application is big and for the sake of separation of concern, you may maintain different DataContract classes for
lose coupling. That depends on need and size of application.
hope it helps./.