Click here to Skip to main content
15,885,546 members
Articles / Web Development / ASP.NET

How to Build Flexible and Reusable WCF Services

Rate me:
Please Sign up or sign in to vote.
4.85/5 (13 votes)
6 May 2013GPL313 min read 77.1K   1.9K   126  
Design Patterns and best practices for building flexible and reusable WCF services.
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by an Xomega.Net generator.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

using AdventureWorks.Client.Objects;
using System;
using Xomega.Framework;
using Xomega.Framework.Properties;

namespace AdventureWorks.Client.Objects
{
    public partial class EmployeeCriteria : DataObject
    {
        #region Constants

        public const string FirstName = "FirstName";
        public const string FirstNameOperator = "FirstNameOperator";
        public const string HireDate = "HireDate";
        public const string HireDate2 = "HireDate2";
        public const string HireDateOperator = "HireDateOperator";
        public const string LastName = "LastName";
        public const string ManagerLastName = "ManagerLastName";
        public const string State = "State";
        public const string StateOperator = "StateOperator";
        public const string Zipcode = "Zipcode";
        public const string ZipcodeOperator = "ZipcodeOperator";

        #endregion
        
        #region Properties

        public TextProperty FirstNameProperty { get; private set; }
        public OperatorProperty FirstNameOperatorProperty { get; private set; }
        public DateProperty HireDateProperty { get; private set; }
        public DateProperty HireDate2Property { get; private set; }
        public OperatorProperty HireDateOperatorProperty { get; private set; }
        public TextProperty LastNameProperty { get; private set; }
        public TextProperty ManagerLastNameProperty { get; private set; }
        public EmployeeStateProperty StateProperty { get; private set; }
        public OperatorProperty StateOperatorProperty { get; private set; }
        public TextProperty ZipcodeProperty { get; private set; }
        public OperatorProperty ZipcodeOperatorProperty { get; private set; }

        #endregion

        #region Construction

        protected override void Initialize()
        {
            FirstNameProperty = new TextProperty(this, FirstName);
            FirstNameProperty.Size = 50;
            FirstNameOperatorProperty = new OperatorProperty(this, FirstNameOperator);
            FirstNameOperatorProperty.Size = 10;
            FirstNameOperatorProperty.EnumType = "operators";
            HireDateProperty = new DateProperty(this, HireDate);
            HireDateProperty.Required = true;
            HireDate2Property = new DateProperty(this, HireDate2);
            HireDateOperatorProperty = new OperatorProperty(this, HireDateOperator);
            HireDateOperatorProperty.Size = 10;
            HireDateOperatorProperty.EnumType = "operators";
            LastNameProperty = new TextProperty(this, LastName);
            LastNameProperty.Size = 50;
            ManagerLastNameProperty = new TextProperty(this, ManagerLastName);
            ManagerLastNameProperty.Size = 50;
            StateProperty = new EmployeeStateProperty(this, State);
            StateProperty.IsMultiValued = true;
            StateOperatorProperty = new OperatorProperty(this, StateOperator);
            StateOperatorProperty.Size = 10;
            StateOperatorProperty.EnumType = "operators";
            ZipcodeProperty = new TextProperty(this, Zipcode);
            ZipcodeProperty.IsMultiValued = true;
            ZipcodeProperty.Size = 15;
            ZipcodeOperatorProperty = new OperatorProperty(this, ZipcodeOperator);
            ZipcodeOperatorProperty.Size = 10;
            ZipcodeOperatorProperty.EnumType = "operators";
        }

        #endregion
    }

}

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 GNU General Public License (GPLv3)


Written By
Architect Xomega.Net
United States United States
Xomega Team is striving to increase productivity and development quality by utilizing Model Driven Development coupled with Code Generation and the best design practices for application development.
We provide MDD tools, code generators and frameworks for Visual Studio and .Net development.
Visit us at http://www.xomega.net
This is a Organisation

1 members

Comments and Discussions