Click here to Skip to main content
15,893,161 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 ContactObject : DataObject
    {
        #region Constants

        public const string EmailAddress = "EmailAddress";
        public const string FirstName = "FirstName";
        public const string LastName = "LastName";
        public const string MiddleName = "MiddleName";
        public const string Phone = "Phone";

        #endregion
        
        #region Properties

        public TextProperty EmailAddressProperty { get; private set; }
        public TextProperty FirstNameProperty { get; private set; }
        public TextProperty LastNameProperty { get; private set; }
        public TextProperty MiddleNameProperty { get; private set; }
        public TextProperty PhoneProperty { get; private set; }

        #endregion

        #region Construction

        protected override void Initialize()
        {
            EmailAddressProperty = new TextProperty(this, EmailAddress);
            EmailAddressProperty.Size = 50;
            FirstNameProperty = new TextProperty(this, FirstName);
            FirstNameProperty.Required = true;
            FirstNameProperty.Size = 50;
            LastNameProperty = new TextProperty(this, LastName);
            LastNameProperty.Required = true;
            LastNameProperty.Size = 50;
            MiddleNameProperty = new TextProperty(this, MiddleName);
            MiddleNameProperty.Size = 50;
            PhoneProperty = new TextProperty(this, Phone);
            PhoneProperty.Size = 25;
        }

        #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