Windows Server AppFabric / Workflow Services Demo - Contoso HR

This sample demonstrates how you can use a Windows Workflow Foundation (WF4) Workflow Service and Windows Server AppFabric to construct a long running business process.

C# (6.3 MB)
 
 
 
 
 
4.9 Star
(8)
6,155 times
Add to favorites
12/3/2011
E-mail Twitter del.icio.us Digg Facebook

Solution explorer

C#
// ----------------------------------------------------------------------------------
// Microsoft Developer & Platform Evangelism
// 
// Copyright (c) Microsoft Corporation. All rights reserved.
// 
// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, 
// EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES 
// OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
// ----------------------------------------------------------------------------------
// The example companies, organizations, products, domain names,
// e-mail addresses, logos, people, places, and events depicted
// herein are fictitious.  No association with any real company,
// organization, product, domain name, email address, logo, person,
// places, or events is intended or should be inferred.
// ----------------------------------------------------------------------------------

//------------------------------------------------------------------------------
// <auto-generated>
//    This code was generated from a template.
//
//    Manual changes to this file may cause unexpected behavior in your application.
//    Manual changes to this file will be overwritten if the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

using System;
using System.Data.Objects;
using System.Data.Objects.DataClasses;
using System.Data.EntityClient;
using System.ComponentModel;
using System.Xml.Serialization;
using System.Runtime.Serialization;

[assembly: EdmSchemaAttribute()]

namespace HRApplicationServices.Data
{
    #region Contexts
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    public partial class HRApplicationDataEntities : ObjectContext
    {
        #region Constructors
    
        /// <summary>
        /// Initializes a new HRApplicationDataEntities object using the connection string found in the 'HRApplicationDataEntities' section of the application configuration file.
        /// </summary>
        public HRApplicationDataEntities() : base("name=HRApplicationDataEntities", "HRApplicationDataEntities")
        {
            this.ContextOptions.LazyLoadingEnabled = true;
            OnContextCreated();
        }
    
        /// <summary>
        /// Initialize a new HRApplicationDataEntities object.
        /// </summary>
        public HRApplicationDataEntities(string connectionString) : base(connectionString, "HRApplicationDataEntities")
        {
            this.ContextOptions.LazyLoadingEnabled = true;
            OnContextCreated();
        }
    
        /// <summary>
        /// Initialize a new HRApplicationDataEntities object.
        /// </summary>
        public HRApplicationDataEntities(EntityConnection connection) : base(connection, "HRApplicationDataEntities")
        {
            this.ContextOptions.LazyLoadingEnabled = true;
            OnContextCreated();
        }
    
        #endregion
    
        #region Partial Methods
    
        partial void OnContextCreated();
    
        #endregion
    
        #region ObjectSet Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<Applicant> Applicants
        {
            get
            {
                if ((_Applicants == null))
                {
                    _Applicants = base.CreateObjectSet<Applicant>("Applicants");
                }
                return _Applicants;
            }
        }
        private ObjectSet<Applicant> _Applicants;

        #endregion
        #region AddTo Methods
    
        /// <summary>
        /// Deprecated Method for adding a new object to the Applicants EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToApplicants(Applicant applicant)
        {
            base.AddObject("Applicants", applicant);
        }

        #endregion
    }
    

    #endregion
    
    #region Entities
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="HRApplicationDataModel", Name="Applicant")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class Applicant : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new Applicant object.
        /// </summary>
        /// <param name="applicationID">Initial value of the ApplicationID property.</param>
        /// <param name="applicantName">Initial value of the ApplicantName property.</param>
        /// <param name="numberOfReferences">Initial value of the NumberOfReferences property.</param>
        /// <param name="requestID">Initial value of the RequestID property.</param>
        /// <param name="education">Initial value of the Education property.</param>
        public static Applicant CreateApplicant(global::System.Int32 applicationID, global::System.String applicantName, global::System.Int32 numberOfReferences, global::System.Guid requestID, global::System.String education)
        {
            Applicant applicant = new Applicant();
            applicant.ApplicationID = applicationID;
            applicant.ApplicantName = applicantName;
            applicant.NumberOfReferences = numberOfReferences;
            applicant.RequestID = requestID;
            applicant.Education = education;
            return applicant;
        }

        #endregion
        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 ApplicationID
        {
            get
            {
                return _ApplicationID;
            }
            set
            {
                if (_ApplicationID != value)
                {
                    OnApplicationIDChanging(value);
                    ReportPropertyChanging("ApplicationID");
                    _ApplicationID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("ApplicationID");
                    OnApplicationIDChanged();
                }
            }
        }
        private global::System.Int32 _ApplicationID;
        partial void OnApplicationIDChanging(global::System.Int32 value);
        partial void OnApplicationIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String ApplicantName
        {
            get
            {
                return _ApplicantName;
            }
            set
            {
                OnApplicantNameChanging(value);
                ReportPropertyChanging("ApplicantName");
                _ApplicantName = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("ApplicantName");
                OnApplicantNameChanged();
            }
        }
        private global::System.String _ApplicantName;
        partial void OnApplicantNameChanging(global::System.String value);
        partial void OnApplicantNameChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 NumberOfReferences
        {
            get
            {
                return _NumberOfReferences;
            }
            set
            {
                OnNumberOfReferencesChanging(value);
                ReportPropertyChanging("NumberOfReferences");
                _NumberOfReferences = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("NumberOfReferences");
                OnNumberOfReferencesChanged();
            }
        }
        private global::System.Int32 _NumberOfReferences;
        partial void OnNumberOfReferencesChanging(global::System.Int32 value);
        partial void OnNumberOfReferencesChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Guid RequestID
        {
            get
            {
                return _RequestID;
            }
            set
            {
                OnRequestIDChanging(value);
                ReportPropertyChanging("RequestID");
                _RequestID = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("RequestID");
                OnRequestIDChanged();
            }
        }
        private global::System.Guid _RequestID;
        partial void OnRequestIDChanging(global::System.Guid value);
        partial void OnRequestIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String Education
        {
            get
            {
                return _Education;
            }
            set
            {
                OnEducationChanging(value);
                ReportPropertyChanging("Education");
                _Education = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Education");
                OnEducationChanged();
            }
        }
        private global::System.String _Education;
        partial void OnEducationChanging(global::System.String value);
        partial void OnEducationChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Boolean> HireApproved
        {
            get
            {
                return _HireApproved;
            }
            set
            {
                OnHireApprovedChanging(value);
                ReportPropertyChanging("HireApproved");
                _HireApproved = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("HireApproved");
                OnHireApprovedChanged();
            }
        }
        private Nullable<global::System.Boolean> _HireApproved;
        partial void OnHireApprovedChanging(Nullable<global::System.Boolean> value);
        partial void OnHireApprovedChanged();

        #endregion
    
    }

    #endregion
    
}