//------------------------------------------------------------------------------
// <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.ComponentModel;
using System.Data.EntityClient;
using System.Data.Objects;
using System.Data.Objects.DataClasses;
using System.Linq;
using System.Runtime.Serialization;
using System.Xml.Serialization;

[assembly: EdmSchemaAttribute()]
#region EDM Relationship Metadata

[assembly: EdmRelationshipAttribute("fpsrx_testModel", "FK_Users_UserTypes", "UserType", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(KendoDateSample.UserType), "User", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(KendoDateSample.User), true)]

#endregion

namespace KendoDateSample
{
    #region Contexts
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    public partial class FPSTestEntities : ObjectContext
    {
        #region Constructors
    
        /// <summary>
        /// Initializes a new FPSTestEntities object using the connection string found in the 'FPSTestEntities' section of the application configuration file.
        /// </summary>
        public FPSTestEntities() : base("name=FPSTestEntities", "FPSTestEntities")
        {
            this.ContextOptions.LazyLoadingEnabled = true;
            OnContextCreated();
        }
    
        /// <summary>
        /// Initialize a new FPSTestEntities object.
        /// </summary>
        public FPSTestEntities(string connectionString) : base(connectionString, "FPSTestEntities")
        {
            this.ContextOptions.LazyLoadingEnabled = true;
            OnContextCreated();
        }
    
        /// <summary>
        /// Initialize a new FPSTestEntities object.
        /// </summary>
        public FPSTestEntities(EntityConnection connection) : base(connection, "FPSTestEntities")
        {
            this.ContextOptions.LazyLoadingEnabled = true;
            OnContextCreated();
        }
    
        #endregion
    
        #region Partial Methods
    
        partial void OnContextCreated();
    
        #endregion
    
        #region ObjectSet Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<MobileCarrier> MobileCarriers
        {
            get
            {
                if ((_MobileCarriers == null))
                {
                    _MobileCarriers = base.CreateObjectSet<MobileCarrier>("MobileCarriers");
                }
                return _MobileCarriers;
            }
        }
        private ObjectSet<MobileCarrier> _MobileCarriers;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<State> States
        {
            get
            {
                if ((_States == null))
                {
                    _States = base.CreateObjectSet<State>("States");
                }
                return _States;
            }
        }
        private ObjectSet<State> _States;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<User> Users
        {
            get
            {
                if ((_Users == null))
                {
                    _Users = base.CreateObjectSet<User>("Users");
                }
                return _Users;
            }
        }
        private ObjectSet<User> _Users;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<UserType> UserTypes
        {
            get
            {
                if ((_UserTypes == null))
                {
                    _UserTypes = base.CreateObjectSet<UserType>("UserTypes");
                }
                return _UserTypes;
            }
        }
        private ObjectSet<UserType> _UserTypes;

        #endregion

        #region AddTo Methods
    
        /// <summary>
        /// Deprecated Method for adding a new object to the MobileCarriers EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToMobileCarriers(MobileCarrier mobileCarrier)
        {
            base.AddObject("MobileCarriers", mobileCarrier);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the States EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToStates(State state)
        {
            base.AddObject("States", state);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the Users EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToUsers(User user)
        {
            base.AddObject("Users", user);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the UserTypes EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToUserTypes(UserType userType)
        {
            base.AddObject("UserTypes", userType);
        }

        #endregion

    }

    #endregion

    #region Entities
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="fpsrx_testModel", Name="MobileCarrier")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class MobileCarrier : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new MobileCarrier object.
        /// </summary>
        /// <param name="id">Initial value of the Id property.</param>
        /// <param name="name">Initial value of the Name property.</param>
        /// <param name="suffix">Initial value of the Suffix property.</param>
        public static MobileCarrier CreateMobileCarrier(global::System.Byte id, global::System.String name, global::System.String suffix)
        {
            MobileCarrier mobileCarrier = new MobileCarrier();
            mobileCarrier.Id = id;
            mobileCarrier.Name = name;
            mobileCarrier.Suffix = suffix;
            return mobileCarrier;
        }

        #endregion

        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Byte Id
        {
            get
            {
                return _Id;
            }
            set
            {
                if (_Id != value)
                {
                    OnIdChanging(value);
                    ReportPropertyChanging("Id");
                    _Id = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("Id");
                    OnIdChanged();
                }
            }
        }
        private global::System.Byte _Id;
        partial void OnIdChanging(global::System.Byte value);
        partial void OnIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String Name
        {
            get
            {
                return _Name;
            }
            set
            {
                OnNameChanging(value);
                ReportPropertyChanging("Name");
                _Name = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Name");
                OnNameChanged();
            }
        }
        private global::System.String _Name;
        partial void OnNameChanging(global::System.String value);
        partial void OnNameChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String Suffix
        {
            get
            {
                return _Suffix;
            }
            set
            {
                OnSuffixChanging(value);
                ReportPropertyChanging("Suffix");
                _Suffix = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Suffix");
                OnSuffixChanged();
            }
        }
        private global::System.String _Suffix;
        partial void OnSuffixChanging(global::System.String value);
        partial void OnSuffixChanged();

        #endregion

    
    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="fpsrx_testModel", Name="State")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class State : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new State object.
        /// </summary>
        /// <param name="id">Initial value of the Id property.</param>
        /// <param name="name">Initial value of the Name property.</param>
        public static State CreateState(global::System.String id, global::System.String name)
        {
            State state = new State();
            state.Id = id;
            state.Name = name;
            return state;
        }

        #endregion

        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String Id
        {
            get
            {
                return _Id;
            }
            set
            {
                if (_Id != value)
                {
                    OnIdChanging(value);
                    ReportPropertyChanging("Id");
                    _Id = StructuralObject.SetValidValue(value, false);
                    ReportPropertyChanged("Id");
                    OnIdChanged();
                }
            }
        }
        private global::System.String _Id;
        partial void OnIdChanging(global::System.String value);
        partial void OnIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String Name
        {
            get
            {
                return _Name;
            }
            set
            {
                OnNameChanging(value);
                ReportPropertyChanging("Name");
                _Name = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Name");
                OnNameChanged();
            }
        }
        private global::System.String _Name;
        partial void OnNameChanging(global::System.String value);
        partial void OnNameChanged();

        #endregion

    
    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="fpsrx_testModel", Name="User")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class User : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new User object.
        /// </summary>
        /// <param name="id">Initial value of the Id property.</param>
        /// <param name="created">Initial value of the Created property.</param>
        /// <param name="userTypeId">Initial value of the UserTypeId property.</param>
        /// <param name="firstName">Initial value of the FirstName property.</param>
        /// <param name="lastName">Initial value of the LastName property.</param>
        /// <param name="salesManagerId">Initial value of the SalesManagerId property.</param>
        /// <param name="salesRepId">Initial value of the SalesRepId property.</param>
        /// <param name="doctorId">Initial value of the DoctorId property.</param>
        /// <param name="isActive">Initial value of the IsActive property.</param>
        /// <param name="carrierId">Initial value of the CarrierId property.</param>
        public static User CreateUser(global::System.Int32 id, global::System.DateTime created, global::System.Byte userTypeId, global::System.String firstName, global::System.String lastName, global::System.Int32 salesManagerId, global::System.Int32 salesRepId, global::System.Int32 doctorId, global::System.Boolean isActive, global::System.Byte carrierId)
        {
            User user = new User();
            user.Id = id;
            user.Created = created;
            user.UserTypeId = userTypeId;
            user.FirstName = firstName;
            user.LastName = lastName;
            user.SalesManagerId = salesManagerId;
            user.SalesRepId = salesRepId;
            user.DoctorId = doctorId;
            user.IsActive = isActive;
            user.CarrierId = carrierId;
            return user;
        }

        #endregion

        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 Id
        {
            get
            {
                return _Id;
            }
            set
            {
                if (_Id != value)
                {
                    OnIdChanging(value);
                    ReportPropertyChanging("Id");
                    _Id = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("Id");
                    OnIdChanged();
                }
            }
        }
        private global::System.Int32 _Id;
        partial void OnIdChanging(global::System.Int32 value);
        partial void OnIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.DateTime Created
        {
            get
            {
                return _Created;
            }
            set
            {
                OnCreatedChanging(value);
                ReportPropertyChanging("Created");
                _Created = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Created");
                OnCreatedChanged();
            }
        }
        private global::System.DateTime _Created;
        partial void OnCreatedChanging(global::System.DateTime value);
        partial void OnCreatedChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Byte UserTypeId
        {
            get
            {
                return _UserTypeId;
            }
            set
            {
                OnUserTypeIdChanging(value);
                ReportPropertyChanging("UserTypeId");
                _UserTypeId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("UserTypeId");
                OnUserTypeIdChanged();
            }
        }
        private global::System.Byte _UserTypeId;
        partial void OnUserTypeIdChanging(global::System.Byte value);
        partial void OnUserTypeIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String FirstName
        {
            get
            {
                return _FirstName;
            }
            set
            {
                OnFirstNameChanging(value);
                ReportPropertyChanging("FirstName");
                _FirstName = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("FirstName");
                OnFirstNameChanged();
            }
        }
        private global::System.String _FirstName;
        partial void OnFirstNameChanging(global::System.String value);
        partial void OnFirstNameChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String LastName
        {
            get
            {
                return _LastName;
            }
            set
            {
                OnLastNameChanging(value);
                ReportPropertyChanging("LastName");
                _LastName = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("LastName");
                OnLastNameChanged();
            }
        }
        private global::System.String _LastName;
        partial void OnLastNameChanging(global::System.String value);
        partial void OnLastNameChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String Email
        {
            get
            {
                return _Email;
            }
            set
            {
                OnEmailChanging(value);
                ReportPropertyChanging("Email");
                _Email = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Email");
                OnEmailChanged();
            }
        }
        private global::System.String _Email;
        partial void OnEmailChanging(global::System.String value);
        partial void OnEmailChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String Password
        {
            get
            {
                return _Password;
            }
            set
            {
                OnPasswordChanging(value);
                ReportPropertyChanging("Password");
                _Password = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Password");
                OnPasswordChanged();
            }
        }
        private global::System.String _Password;
        partial void OnPasswordChanging(global::System.String value);
        partial void OnPasswordChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String AddressLine1
        {
            get
            {
                return _AddressLine1;
            }
            set
            {
                OnAddressLine1Changing(value);
                ReportPropertyChanging("AddressLine1");
                _AddressLine1 = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("AddressLine1");
                OnAddressLine1Changed();
            }
        }
        private global::System.String _AddressLine1;
        partial void OnAddressLine1Changing(global::System.String value);
        partial void OnAddressLine1Changed();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String AddressLine2
        {
            get
            {
                return _AddressLine2;
            }
            set
            {
                OnAddressLine2Changing(value);
                ReportPropertyChanging("AddressLine2");
                _AddressLine2 = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("AddressLine2");
                OnAddressLine2Changed();
            }
        }
        private global::System.String _AddressLine2;
        partial void OnAddressLine2Changing(global::System.String value);
        partial void OnAddressLine2Changed();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String City
        {
            get
            {
                return _City;
            }
            set
            {
                OnCityChanging(value);
                ReportPropertyChanging("City");
                _City = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("City");
                OnCityChanged();
            }
        }
        private global::System.String _City;
        partial void OnCityChanging(global::System.String value);
        partial void OnCityChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String StateId
        {
            get
            {
                return _StateId;
            }
            set
            {
                OnStateIdChanging(value);
                ReportPropertyChanging("StateId");
                _StateId = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("StateId");
                OnStateIdChanged();
            }
        }
        private global::System.String _StateId;
        partial void OnStateIdChanging(global::System.String value);
        partial void OnStateIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String Zipcode
        {
            get
            {
                return _Zipcode;
            }
            set
            {
                OnZipcodeChanging(value);
                ReportPropertyChanging("Zipcode");
                _Zipcode = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Zipcode");
                OnZipcodeChanged();
            }
        }
        private global::System.String _Zipcode;
        partial void OnZipcodeChanging(global::System.String value);
        partial void OnZipcodeChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String Phone1
        {
            get
            {
                return _Phone1;
            }
            set
            {
                OnPhone1Changing(value);
                ReportPropertyChanging("Phone1");
                _Phone1 = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Phone1");
                OnPhone1Changed();
            }
        }
        private global::System.String _Phone1;
        partial void OnPhone1Changing(global::System.String value);
        partial void OnPhone1Changed();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 SalesManagerId
        {
            get
            {
                return _SalesManagerId;
            }
            set
            {
                OnSalesManagerIdChanging(value);
                ReportPropertyChanging("SalesManagerId");
                _SalesManagerId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("SalesManagerId");
                OnSalesManagerIdChanged();
            }
        }
        private global::System.Int32 _SalesManagerId;
        partial void OnSalesManagerIdChanging(global::System.Int32 value);
        partial void OnSalesManagerIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 SalesRepId
        {
            get
            {
                return _SalesRepId;
            }
            set
            {
                OnSalesRepIdChanging(value);
                ReportPropertyChanging("SalesRepId");
                _SalesRepId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("SalesRepId");
                OnSalesRepIdChanged();
            }
        }
        private global::System.Int32 _SalesRepId;
        partial void OnSalesRepIdChanging(global::System.Int32 value);
        partial void OnSalesRepIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 DoctorId
        {
            get
            {
                return _DoctorId;
            }
            set
            {
                OnDoctorIdChanging(value);
                ReportPropertyChanging("DoctorId");
                _DoctorId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("DoctorId");
                OnDoctorIdChanged();
            }
        }
        private global::System.Int32 _DoctorId;
        partial void OnDoctorIdChanging(global::System.Int32 value);
        partial void OnDoctorIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Boolean IsActive
        {
            get
            {
                return _IsActive;
            }
            set
            {
                OnIsActiveChanging(value);
                ReportPropertyChanging("IsActive");
                _IsActive = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("IsActive");
                OnIsActiveChanged();
            }
        }
        private global::System.Boolean _IsActive;
        partial void OnIsActiveChanging(global::System.Boolean value);
        partial void OnIsActiveChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.DateTime> DOB
        {
            get
            {
                return _DOB;
            }
            set
            {
                OnDOBChanging(value);
                ReportPropertyChanging("DOB");
                _DOB = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("DOB");
                OnDOBChanged();
            }
        }
        private Nullable<global::System.DateTime> _DOB;
        partial void OnDOBChanging(Nullable<global::System.DateTime> value);
        partial void OnDOBChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Byte CarrierId
        {
            get
            {
                return _CarrierId;
            }
            set
            {
                OnCarrierIdChanging(value);
                ReportPropertyChanging("CarrierId");
                _CarrierId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("CarrierId");
                OnCarrierIdChanged();
            }
        }
        private global::System.Byte _CarrierId;
        partial void OnCarrierIdChanging(global::System.Byte value);
        partial void OnCarrierIdChanged();

        #endregion

    
        #region Navigation Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("fpsrx_testModel", "FK_Users_UserTypes", "UserType")]
        public UserType UserType
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<UserType>("fpsrx_testModel.FK_Users_UserTypes", "UserType").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<UserType>("fpsrx_testModel.FK_Users_UserTypes", "UserType").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<UserType> UserTypeReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<UserType>("fpsrx_testModel.FK_Users_UserTypes", "UserType");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<UserType>("fpsrx_testModel.FK_Users_UserTypes", "UserType", value);
                }
            }
        }

        #endregion

    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="fpsrx_testModel", Name="UserType")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class UserType : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new UserType object.
        /// </summary>
        /// <param name="id">Initial value of the Id property.</param>
        /// <param name="name">Initial value of the Name property.</param>
        /// <param name="isActive">Initial value of the IsActive property.</param>
        public static UserType CreateUserType(global::System.Byte id, global::System.String name, global::System.Boolean isActive)
        {
            UserType userType = new UserType();
            userType.Id = id;
            userType.Name = name;
            userType.IsActive = isActive;
            return userType;
        }

        #endregion

        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Byte Id
        {
            get
            {
                return _Id;
            }
            set
            {
                if (_Id != value)
                {
                    OnIdChanging(value);
                    ReportPropertyChanging("Id");
                    _Id = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("Id");
                    OnIdChanged();
                }
            }
        }
        private global::System.Byte _Id;
        partial void OnIdChanging(global::System.Byte value);
        partial void OnIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String Name
        {
            get
            {
                return _Name;
            }
            set
            {
                OnNameChanging(value);
                ReportPropertyChanging("Name");
                _Name = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Name");
                OnNameChanged();
            }
        }
        private global::System.String _Name;
        partial void OnNameChanging(global::System.String value);
        partial void OnNameChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Boolean IsActive
        {
            get
            {
                return _IsActive;
            }
            set
            {
                OnIsActiveChanging(value);
                ReportPropertyChanging("IsActive");
                _IsActive = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("IsActive");
                OnIsActiveChanged();
            }
        }
        private global::System.Boolean _IsActive;
        partial void OnIsActiveChanging(global::System.Boolean value);
        partial void OnIsActiveChanged();

        #endregion

    
        #region Navigation Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("fpsrx_testModel", "FK_Users_UserTypes", "User")]
        public EntityCollection<User> Users
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<User>("fpsrx_testModel.FK_Users_UserTypes", "User");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<User>("fpsrx_testModel.FK_Users_UserTypes", "User", value);
                }
            }
        }

        #endregion

    }

    #endregion

    
}
