質問

I am making a WCF service, and I want to make certain DataMembers which are string values of my requests required (i.e., not null, not empty), because we have institutional/legal access logging requirements to sensitive data (we need to log by whom and when the access was made)

I'm guessing that some of this is the fact that my DataMembers are strings, and that strings that are null can be valid. Can anyone help me with this definition?

namespace CrdWcfServiceInterface.Request
{
    [DataContract]
    public class GetPatientDemographicsRequest
    {
       [DataMember]
       public string PatientID { get; set; }
       [DataMember(IsRequired=true)]
       public string RequesterLanID { get; set; }
       [DataMember(IsRequired=true)]
       public string ApplicationName { get; set; }

    }
}
役に立ちましたか?

解決

Please take a look at integrating the Enterprise library blocks to handle the validation alongwith WCF as shown here

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top