Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Dynamic LINQ to Entities Queries Using WCF/WPF Demo Code

, 30 Nov 2008 CPOL
Demonstrates a method of dynamic query across WCF Service boundaries.
Linq2WCF.zip
Linq2WCF
Lib
FluidKit.dll
LINQ2Entities
bin
Debug
Release
LINQ2Entities.dll
Northwind.edmx
obj
Debug
Refactor
TempPE
Release
TempPE
Properties
Linq2WCF.4.1.resharper.user
Linq2WCF.gpState
PortalHost
bin
Debug
Release
LINQ2Entities.dll
PortalHost.exe
PortalHost.InstallLog
PortalHost.InstallState
Service.dll
obj
Debug
Refactor
TempPE
Release
TempPE
Properties
PortalMSIInstaller
Debug
PortalMSIInstaller.vdproj
Release
PortalMSIInstaller.msi
setup.exe
PortalService
bin
Debug
Release
LINQ2Entities.dll
Service.dll
Contracts
DataContracts
Requests
Responses
obj
Debug
Refactor
TempPE
Release
TempPE
Properties
WpfClient
AttachedProperties
bin
Debug
Release
FluidKit.dll
WpfClient.exe
WpfClient.vshost.exe
WpfClient.vshost.exe.manifest
Commands
EventArgs
Images
close.png
Customer.png
Diag.png
lvDetails.png
lvIcons.png
lvList.png
Order.png
run.png
Search.png
searchGlass.png
obj
Debug
App.baml
CustomerOrdersWindow.baml
DiagnosticsWindow.baml
Refactor
Resources
AppStyles.baml
TempPE
Properties.Resources.Designer.cs.dll
Service References.ServiceClient.Reference.cs.dll
Service References.ServiceReference.Reference.cs.dll
UserControls
CurrentCustomerControl.baml
CurrentCustomerOrdersControl.baml
SearchClauseControl.baml
SearchControl.baml
WpfClient.exe
WpfClient_MarkupCompile.lref
Release
App.baml
CustomerOrdersWindow.baml
DiagnosticsWindow.baml
Resources
AppStyles.baml
TempPE
Properties.Resources.Designer.cs.dll
Service References.ServiceReference.Reference.cs.dll
UserControls
CurrentCustomerControl.baml
CurrentCustomerOrdersControl.baml
SearchClauseControl.baml
SearchControl.baml
WpfClient.exe
WpfClient_MarkupCompile.lref
Properties
Settings.settings
Resources
Service References
ServiceReference
configuration.svcinfo
configuration91.svcinfo
Portal.wsdl
Portal1.wsdl
Reference.svcmap
WpfClient.ServiceReference.Response.datasource
ServiceProxy
UserControls
ValueConverters
ViewModels
WPFClient.csproj.user
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:2.0.50727.3031
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace WpfClient.ServiceReference {
    using System.Runtime.Serialization;
    using System;
    
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="Request", Namespace="http://schemas.datacontract.org/2004/07/Service.Portal")]
    [System.SerializableAttribute()]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(WpfClient.ServiceReference.CustomerRequest))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(WpfClient.ServiceReference.CustomerSearchRequest))]
    public partial class Request : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged {
        
        [System.NonSerializedAttribute()]
        private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
        
        [global::System.ComponentModel.BrowsableAttribute(false)]
        public System.Runtime.Serialization.ExtensionDataObject ExtensionData {
            get {
                return this.extensionDataField;
            }
            set {
                this.extensionDataField = value;
            }
        }
        
        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        
        protected void RaisePropertyChanged(string propertyName) {
            System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if ((propertyChanged != null)) {
                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="CustomerRequest", Namespace="http://schemas.datacontract.org/2004/07/Service.Portal")]
    [System.SerializableAttribute()]
    public partial class CustomerRequest : WpfClient.ServiceReference.Request {
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="CustomerSearchRequest", Namespace="http://schemas.datacontract.org/2004/07/Service.Portal")]
    [System.SerializableAttribute()]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(System.Collections.Generic.List<object>))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(WpfClient.ServiceReference.EntityKey))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(System.Collections.Generic.List<WpfClient.ServiceReference.EntityKeyMember>))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(WpfClient.ServiceReference.EntityKeyMember))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(System.Collections.Generic.List<WpfClient.ServiceReference.Customers>))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(WpfClient.ServiceReference.Customers))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(System.Collections.Generic.List<WpfClient.ServiceReference.Orders>))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(WpfClient.ServiceReference.Orders))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(System.Exception))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(System.ApplicationException))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(System.ArgumentException))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(System.SystemException))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(WpfClient.ServiceReference.Request))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(WpfClient.ServiceReference.CustomerRequest))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(WpfClient.ServiceReference.Response))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(WpfClient.ServiceReference.CustomerResponse))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(WpfClient.ServiceReference.EntityObject))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(WpfClient.ServiceReference.StructuralObject))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(WpfClient.ServiceReference.EntityReferenceOfCustomershovVakal))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(WpfClient.ServiceReference.EntityReference))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(WpfClient.ServiceReference.RelatedEnd))]
    public partial class CustomerSearchRequest : WpfClient.ServiceReference.Request {
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private System.Collections.Generic.List<object> SearchParametersField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private string WhereClauseField;
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public System.Collections.Generic.List<object> SearchParameters {
            get {
                return this.SearchParametersField;
            }
            set {
                if ((object.ReferenceEquals(this.SearchParametersField, value) != true)) {
                    this.SearchParametersField = value;
                    this.RaisePropertyChanged("SearchParameters");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string WhereClause {
            get {
                return this.WhereClauseField;
            }
            set {
                if ((object.ReferenceEquals(this.WhereClauseField, value) != true)) {
                    this.WhereClauseField = value;
                    this.RaisePropertyChanged("WhereClause");
                }
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="EntityKey", Namespace="http://schemas.datacontract.org/2004/07/System.Data", IsReference=true)]
    [System.SerializableAttribute()]
    public partial class EntityKey : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged {
        
        [System.NonSerializedAttribute()]
        private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private string EntityContainerNameField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private System.Collections.Generic.List<WpfClient.ServiceReference.EntityKeyMember> EntityKeyValuesField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private string EntitySetNameField;
        
        [global::System.ComponentModel.BrowsableAttribute(false)]
        public System.Runtime.Serialization.ExtensionDataObject ExtensionData {
            get {
                return this.extensionDataField;
            }
            set {
                this.extensionDataField = value;
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string EntityContainerName {
            get {
                return this.EntityContainerNameField;
            }
            set {
                if ((object.ReferenceEquals(this.EntityContainerNameField, value) != true)) {
                    this.EntityContainerNameField = value;
                    this.RaisePropertyChanged("EntityContainerName");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public System.Collections.Generic.List<WpfClient.ServiceReference.EntityKeyMember> EntityKeyValues {
            get {
                return this.EntityKeyValuesField;
            }
            set {
                if ((object.ReferenceEquals(this.EntityKeyValuesField, value) != true)) {
                    this.EntityKeyValuesField = value;
                    this.RaisePropertyChanged("EntityKeyValues");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string EntitySetName {
            get {
                return this.EntitySetNameField;
            }
            set {
                if ((object.ReferenceEquals(this.EntitySetNameField, value) != true)) {
                    this.EntitySetNameField = value;
                    this.RaisePropertyChanged("EntitySetName");
                }
            }
        }
        
        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        
        protected void RaisePropertyChanged(string propertyName) {
            System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if ((propertyChanged != null)) {
                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="EntityKeyMember", Namespace="http://schemas.datacontract.org/2004/07/System.Data")]
    [System.SerializableAttribute()]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(System.Collections.Generic.List<object>))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(WpfClient.ServiceReference.EntityKey))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(System.Collections.Generic.List<WpfClient.ServiceReference.EntityKeyMember>))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(System.Collections.Generic.List<WpfClient.ServiceReference.Customers>))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(WpfClient.ServiceReference.Customers))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(System.Collections.Generic.List<WpfClient.ServiceReference.Orders>))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(WpfClient.ServiceReference.Orders))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(System.Exception))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(System.ApplicationException))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(System.ArgumentException))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(System.SystemException))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(WpfClient.ServiceReference.Request))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(WpfClient.ServiceReference.CustomerRequest))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(WpfClient.ServiceReference.CustomerSearchRequest))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(WpfClient.ServiceReference.Response))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(WpfClient.ServiceReference.CustomerResponse))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(WpfClient.ServiceReference.EntityObject))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(WpfClient.ServiceReference.StructuralObject))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(WpfClient.ServiceReference.EntityReferenceOfCustomershovVakal))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(WpfClient.ServiceReference.EntityReference))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(WpfClient.ServiceReference.RelatedEnd))]
    public partial class EntityKeyMember : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged {
        
        [System.NonSerializedAttribute()]
        private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private string KeyField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private object ValueField;
        
        [global::System.ComponentModel.BrowsableAttribute(false)]
        public System.Runtime.Serialization.ExtensionDataObject ExtensionData {
            get {
                return this.extensionDataField;
            }
            set {
                this.extensionDataField = value;
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string Key {
            get {
                return this.KeyField;
            }
            set {
                if ((object.ReferenceEquals(this.KeyField, value) != true)) {
                    this.KeyField = value;
                    this.RaisePropertyChanged("Key");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public object Value {
            get {
                return this.ValueField;
            }
            set {
                if ((object.ReferenceEquals(this.ValueField, value) != true)) {
                    this.ValueField = value;
                    this.RaisePropertyChanged("Value");
                }
            }
        }
        
        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        
        protected void RaisePropertyChanged(string propertyName) {
            System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if ((propertyChanged != null)) {
                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="Customers", Namespace="http://schemas.datacontract.org/2004/07/LINQ2Entities", IsReference=true)]
    [System.SerializableAttribute()]
    public partial class Customers : WpfClient.ServiceReference.EntityObject {
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private string AddressField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private string CityField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private string CompanyNameField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private string ContactNameField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private string ContactTitleField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private string CountryField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private string CustomerIDField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private string FaxField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private System.Collections.Generic.List<WpfClient.ServiceReference.Orders> OrdersField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private string PhoneField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private string PostalCodeField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private string RegionField;
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string Address {
            get {
                return this.AddressField;
            }
            set {
                if ((object.ReferenceEquals(this.AddressField, value) != true)) {
                    this.AddressField = value;
                    this.RaisePropertyChanged("Address");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string City {
            get {
                return this.CityField;
            }
            set {
                if ((object.ReferenceEquals(this.CityField, value) != true)) {
                    this.CityField = value;
                    this.RaisePropertyChanged("City");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string CompanyName {
            get {
                return this.CompanyNameField;
            }
            set {
                if ((object.ReferenceEquals(this.CompanyNameField, value) != true)) {
                    this.CompanyNameField = value;
                    this.RaisePropertyChanged("CompanyName");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string ContactName {
            get {
                return this.ContactNameField;
            }
            set {
                if ((object.ReferenceEquals(this.ContactNameField, value) != true)) {
                    this.ContactNameField = value;
                    this.RaisePropertyChanged("ContactName");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string ContactTitle {
            get {
                return this.ContactTitleField;
            }
            set {
                if ((object.ReferenceEquals(this.ContactTitleField, value) != true)) {
                    this.ContactTitleField = value;
                    this.RaisePropertyChanged("ContactTitle");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string Country {
            get {
                return this.CountryField;
            }
            set {
                if ((object.ReferenceEquals(this.CountryField, value) != true)) {
                    this.CountryField = value;
                    this.RaisePropertyChanged("Country");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string CustomerID {
            get {
                return this.CustomerIDField;
            }
            set {
                if ((object.ReferenceEquals(this.CustomerIDField, value) != true)) {
                    this.CustomerIDField = value;
                    this.RaisePropertyChanged("CustomerID");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string Fax {
            get {
                return this.FaxField;
            }
            set {
                if ((object.ReferenceEquals(this.FaxField, value) != true)) {
                    this.FaxField = value;
                    this.RaisePropertyChanged("Fax");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public System.Collections.Generic.List<WpfClient.ServiceReference.Orders> Orders {
            get {
                return this.OrdersField;
            }
            set {
                if ((object.ReferenceEquals(this.OrdersField, value) != true)) {
                    this.OrdersField = value;
                    this.RaisePropertyChanged("Orders");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string Phone {
            get {
                return this.PhoneField;
            }
            set {
                if ((object.ReferenceEquals(this.PhoneField, value) != true)) {
                    this.PhoneField = value;
                    this.RaisePropertyChanged("Phone");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string PostalCode {
            get {
                return this.PostalCodeField;
            }
            set {
                if ((object.ReferenceEquals(this.PostalCodeField, value) != true)) {
                    this.PostalCodeField = value;
                    this.RaisePropertyChanged("PostalCode");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string Region {
            get {
                return this.RegionField;
            }
            set {
                if ((object.ReferenceEquals(this.RegionField, value) != true)) {
                    this.RegionField = value;
                    this.RaisePropertyChanged("Region");
                }
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="Orders", Namespace="http://schemas.datacontract.org/2004/07/LINQ2Entities", IsReference=true)]
    [System.SerializableAttribute()]
    public partial class Orders : WpfClient.ServiceReference.EntityObject {
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private WpfClient.ServiceReference.Customers CustomersField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private WpfClient.ServiceReference.EntityReferenceOfCustomershovVakal CustomersReferenceField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private System.Nullable<int> EmployeeIDField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private System.Nullable<decimal> FreightField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private System.Nullable<System.DateTime> OrderDateField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private int OrderIDField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private System.Nullable<System.DateTime> RequiredDateField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private string ShipAddressField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private string ShipCityField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private string ShipCountryField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private string ShipNameField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private string ShipPostalCodeField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private string ShipRegionField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private System.Nullable<int> ShipViaField;
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private System.Nullable<System.DateTime> ShippedDateField;
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public WpfClient.ServiceReference.Customers Customers {
            get {
                return this.CustomersField;
            }
            set {
                if ((object.ReferenceEquals(this.CustomersField, value) != true)) {
                    this.CustomersField = value;
                    this.RaisePropertyChanged("Customers");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public WpfClient.ServiceReference.EntityReferenceOfCustomershovVakal CustomersReference {
            get {
                return this.CustomersReferenceField;
            }
            set {
                if ((object.ReferenceEquals(this.CustomersReferenceField, value) != true)) {
                    this.CustomersReferenceField = value;
                    this.RaisePropertyChanged("CustomersReference");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public System.Nullable<int> EmployeeID {
            get {
                return this.EmployeeIDField;
            }
            set {
                if ((this.EmployeeIDField.Equals(value) != true)) {
                    this.EmployeeIDField = value;
                    this.RaisePropertyChanged("EmployeeID");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public System.Nullable<decimal> Freight {
            get {
                return this.FreightField;
            }
            set {
                if ((this.FreightField.Equals(value) != true)) {
                    this.FreightField = value;
                    this.RaisePropertyChanged("Freight");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public System.Nullable<System.DateTime> OrderDate {
            get {
                return this.OrderDateField;
            }
            set {
                if ((this.OrderDateField.Equals(value) != true)) {
                    this.OrderDateField = value;
                    this.RaisePropertyChanged("OrderDate");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public int OrderID {
            get {
                return this.OrderIDField;
            }
            set {
                if ((this.OrderIDField.Equals(value) != true)) {
                    this.OrderIDField = value;
                    this.RaisePropertyChanged("OrderID");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public System.Nullable<System.DateTime> RequiredDate {
            get {
                return this.RequiredDateField;
            }
            set {
                if ((this.RequiredDateField.Equals(value) != true)) {
                    this.RequiredDateField = value;
                    this.RaisePropertyChanged("RequiredDate");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string ShipAddress {
            get {
                return this.ShipAddressField;
            }
            set {
                if ((object.ReferenceEquals(this.ShipAddressField, value) != true)) {
                    this.ShipAddressField = value;
                    this.RaisePropertyChanged("ShipAddress");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string ShipCity {
            get {
                return this.ShipCityField;
            }
            set {
                if ((object.ReferenceEquals(this.ShipCityField, value) != true)) {
                    this.ShipCityField = value;
                    this.RaisePropertyChanged("ShipCity");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string ShipCountry {
            get {
                return this.ShipCountryField;
            }
            set {
                if ((object.ReferenceEquals(this.ShipCountryField, value) != true)) {
                    this.ShipCountryField = value;
                    this.RaisePropertyChanged("ShipCountry");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string ShipName {
            get {
                return this.ShipNameField;
            }
            set {
                if ((object.ReferenceEquals(this.ShipNameField, value) != true)) {
                    this.ShipNameField = value;
                    this.RaisePropertyChanged("ShipName");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string ShipPostalCode {
            get {
                return this.ShipPostalCodeField;
            }
            set {
                if ((object.ReferenceEquals(this.ShipPostalCodeField, value) != true)) {
                    this.ShipPostalCodeField = value;
                    this.RaisePropertyChanged("ShipPostalCode");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public string ShipRegion {
            get {
                return this.ShipRegionField;
            }
            set {
                if ((object.ReferenceEquals(this.ShipRegionField, value) != true)) {
                    this.ShipRegionField = value;
                    this.RaisePropertyChanged("ShipRegion");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public System.Nullable<int> ShipVia {
            get {
                return this.ShipViaField;
            }
            set {
                if ((this.ShipViaField.Equals(value) != true)) {
                    this.ShipViaField = value;
                    this.RaisePropertyChanged("ShipVia");
                }
            }
        }
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public System.Nullable<System.DateTime> ShippedDate {
            get {
                return this.ShippedDateField;
            }
            set {
                if ((this.ShippedDateField.Equals(value) != true)) {
                    this.ShippedDateField = value;
                    this.RaisePropertyChanged("ShippedDate");
                }
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="Response", Namespace="http://schemas.datacontract.org/2004/07/Service.Portal")]
    [System.SerializableAttribute()]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(WpfClient.ServiceReference.CustomerResponse))]
    public partial class Response : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged {
        
        [System.NonSerializedAttribute()]
        private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
        
        [global::System.ComponentModel.BrowsableAttribute(false)]
        public System.Runtime.Serialization.ExtensionDataObject ExtensionData {
            get {
                return this.extensionDataField;
            }
            set {
                this.extensionDataField = value;
            }
        }
        
        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        
        protected void RaisePropertyChanged(string propertyName) {
            System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if ((propertyChanged != null)) {
                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="CustomerResponse", Namespace="http://schemas.datacontract.org/2004/07/Service.Portal")]
    [System.SerializableAttribute()]
    public partial class CustomerResponse : WpfClient.ServiceReference.Response {
        
        private System.Collections.Generic.List<WpfClient.ServiceReference.Customers> CustomersField;
        
        [System.Runtime.Serialization.DataMemberAttribute(IsRequired=true)]
        public System.Collections.Generic.List<WpfClient.ServiceReference.Customers> Customers {
            get {
                return this.CustomersField;
            }
            set {
                if ((object.ReferenceEquals(this.CustomersField, value) != true)) {
                    this.CustomersField = value;
                    this.RaisePropertyChanged("Customers");
                }
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="EntityObject", Namespace="http://schemas.datacontract.org/2004/07/System.Data.Objects.DataClasses", IsReference=true)]
    [System.SerializableAttribute()]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(WpfClient.ServiceReference.Orders))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(WpfClient.ServiceReference.Customers))]
    public partial class EntityObject : WpfClient.ServiceReference.StructuralObject {
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private WpfClient.ServiceReference.EntityKey EntityKeyField;
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public WpfClient.ServiceReference.EntityKey EntityKey {
            get {
                return this.EntityKeyField;
            }
            set {
                if ((object.ReferenceEquals(this.EntityKeyField, value) != true)) {
                    this.EntityKeyField = value;
                    this.RaisePropertyChanged("EntityKey");
                }
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="StructuralObject", Namespace="http://schemas.datacontract.org/2004/07/System.Data.Objects.DataClasses", IsReference=true)]
    [System.SerializableAttribute()]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(WpfClient.ServiceReference.EntityObject))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(WpfClient.ServiceReference.Orders))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(WpfClient.ServiceReference.Customers))]
    public partial class StructuralObject : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged {
        
        [System.NonSerializedAttribute()]
        private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
        
        [global::System.ComponentModel.BrowsableAttribute(false)]
        public System.Runtime.Serialization.ExtensionDataObject ExtensionData {
            get {
                return this.extensionDataField;
            }
            set {
                this.extensionDataField = value;
            }
        }
        
        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        
        protected void RaisePropertyChanged(string propertyName) {
            System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if ((propertyChanged != null)) {
                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="EntityReferenceOfCustomershovVakal", Namespace="http://schemas.datacontract.org/2004/07/System.Data.Objects.DataClasses")]
    [System.SerializableAttribute()]
    public partial class EntityReferenceOfCustomershovVakal : WpfClient.ServiceReference.EntityReference {
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="EntityReference", Namespace="http://schemas.datacontract.org/2004/07/System.Data.Objects.DataClasses")]
    [System.SerializableAttribute()]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(WpfClient.ServiceReference.EntityReferenceOfCustomershovVakal))]
    public partial class EntityReference : WpfClient.ServiceReference.RelatedEnd {
        
        [System.Runtime.Serialization.OptionalFieldAttribute()]
        private WpfClient.ServiceReference.EntityKey EntityKeyField;
        
        [System.Runtime.Serialization.DataMemberAttribute()]
        public WpfClient.ServiceReference.EntityKey EntityKey {
            get {
                return this.EntityKeyField;
            }
            set {
                if ((object.ReferenceEquals(this.EntityKeyField, value) != true)) {
                    this.EntityKeyField = value;
                    this.RaisePropertyChanged("EntityKey");
                }
            }
        }
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="RelatedEnd", Namespace="http://schemas.datacontract.org/2004/07/System.Data.Objects.DataClasses")]
    [System.SerializableAttribute()]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(WpfClient.ServiceReference.EntityReference))]
    [System.Runtime.Serialization.KnownTypeAttribute(typeof(WpfClient.ServiceReference.EntityReferenceOfCustomershovVakal))]
    public partial class RelatedEnd : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged {
        
        [System.NonSerializedAttribute()]
        private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
        
        [global::System.ComponentModel.BrowsableAttribute(false)]
        public System.Runtime.Serialization.ExtensionDataObject ExtensionData {
            get {
                return this.extensionDataField;
            }
            set {
                this.extensionDataField = value;
            }
        }
        
        public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
        
        protected void RaisePropertyChanged(string propertyName) {
            System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if ((propertyChanged != null)) {
                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
            }
        }
    }
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    [System.ServiceModel.ServiceContractAttribute(Namespace="http://www.sachabarber.net/2008/cp", ConfigurationName="ServiceReference.IPortal")]
    public interface IPortal {
        
        [System.ServiceModel.OperationContractAttribute(Action="http://www.sachabarber.net/2008/cp/IPortal/ExecuteRequest", ReplyAction="http://www.sachabarber.net/2008/cp/IPortal/ExecuteRequestResponse")]
        [System.ServiceModel.FaultContractAttribute(typeof(System.Exception), Action="http://www.sachabarber.net/2008/cp/IPortal/ExecuteRequestExceptionFault", Name="Exception", Namespace="http://schemas.datacontract.org/2004/07/System")]
        [System.ServiceModel.FaultContractAttribute(typeof(System.ApplicationException), Action="http://www.sachabarber.net/2008/cp/IPortal/ExecuteRequestApplicationExceptionFaul" +
            "t", Name="ApplicationException", Namespace="http://schemas.datacontract.org/2004/07/System")]
        [System.ServiceModel.FaultContractAttribute(typeof(System.ArgumentException), Action="http://www.sachabarber.net/2008/cp/IPortal/ExecuteRequestArgumentExceptionFault", Name="ArgumentException", Namespace="http://schemas.datacontract.org/2004/07/System")]
        WpfClient.ServiceReference.Response ExecuteRequest(WpfClient.ServiceReference.Request request);
    }
    
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    public interface IPortalChannel : WpfClient.ServiceReference.IPortal, System.ServiceModel.IClientChannel {
    }
    
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]
    public partial class PortalClient : System.ServiceModel.ClientBase<WpfClient.ServiceReference.IPortal>, WpfClient.ServiceReference.IPortal {
        
        public PortalClient() {
        }
        
        public PortalClient(string endpointConfigurationName) : 
                base(endpointConfigurationName) {
        }
        
        public PortalClient(string endpointConfigurationName, string remoteAddress) : 
                base(endpointConfigurationName, remoteAddress) {
        }
        
        public PortalClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(endpointConfigurationName, remoteAddress) {
        }
        
        public PortalClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : 
                base(binding, remoteAddress) {
        }
        
        public WpfClient.ServiceReference.Response ExecuteRequest(WpfClient.ServiceReference.Request request) {
            return base.Channel.ExecuteRequest(request);
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Sacha Barber
Software Developer (Senior)
United Kingdom United Kingdom
I currently hold the following qualifications (amongst others, I also studied Music Technology and Electronics, for my sins)
 
- MSc (Passed with distinctions), in Information Technology for E-Commerce
- BSc Hons (1st class) in Computer Science & Artificial Intelligence
 
Both of these at Sussex University UK.
 
Award(s)

I am lucky enough to have won a few awards for Zany Crazy code articles over the years

  • Microsoft C# MVP 2014
  • Codeproject MVP 2014
  • Microsoft C# MVP 2013
  • Codeproject MVP 2013
  • Microsoft C# MVP 2012
  • Codeproject MVP 2012
  • Microsoft C# MVP 2011
  • Codeproject MVP 2011
  • Microsoft C# MVP 2010
  • Codeproject MVP 2010
  • Microsoft C# MVP 2009
  • Codeproject MVP 2009
  • Microsoft C# MVP 2008
  • Codeproject MVP 2008
  • And numerous codeproject awards which you can see over at my blog

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.141220.1 | Last Updated 30 Nov 2008
Article Copyright 2008 by Sacha Barber
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid