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

ASP.NET Pagination

Rate me:
Please Sign up or sign in to vote.
4.84/5 (23 votes)
31 Dec 2012CPOL10 min read 138.5K   73  
This is most common but very important part of every developer's life, Taken from my technical blog http://www.srinetinfo.com
//------------------------------------------------------------------------------
// <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("SurveyAppModel", "FK_Users_Roles", "Roles", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(SimpleSurvey.Role), "Users", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(SimpleSurvey.User), true)]
[assembly: EdmRelationshipAttribute("SurveyAppModel", "FK_Surveys_Users", "Users", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(SimpleSurvey.User), "Surveys", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(SimpleSurvey.Survey), true)]
[assembly: EdmRelationshipAttribute("SurveyAppModel", "FK_Survey_Response_Questions", "Question", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(SimpleSurvey.Question), "Survey_Response", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(SimpleSurvey.Survey_Response), true)]
[assembly: EdmRelationshipAttribute("SurveyAppModel", "FK_SurveyQuestions_Questions", "Question", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(SimpleSurvey.Question), "SurveyQuestion", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(SimpleSurvey.SurveyQuestion), true)]
[assembly: EdmRelationshipAttribute("SurveyAppModel", "FK_Survey_Response_Surveys", "Survey", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(SimpleSurvey.Survey), "Survey_Response", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(SimpleSurvey.Survey_Response), true)]
[assembly: EdmRelationshipAttribute("SurveyAppModel", "FK_Survey_Response_Users", "User", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(SimpleSurvey.User), "Survey_Response", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(SimpleSurvey.Survey_Response), true)]
[assembly: EdmRelationshipAttribute("SurveyAppModel", "FK_SurveyQuestions_Surveys", "Survey", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(SimpleSurvey.Survey), "SurveyQuestion", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(SimpleSurvey.SurveyQuestion), true)]

#endregion

namespace SimpleSurvey
{
    #region Contexts
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    public partial class SurveyAppConString : ObjectContext
    {
        #region Constructors
    
        /// <summary>
        /// Initializes a new SurveyAppConString object using the connection string found in the 'SurveyAppConString' section of the application configuration file.
        /// </summary>
        public SurveyAppConString() : base("name=SurveyAppConString", "SurveyAppConString")
        {
            this.ContextOptions.LazyLoadingEnabled = true;
            OnContextCreated();
        }
    
        /// <summary>
        /// Initialize a new SurveyAppConString object.
        /// </summary>
        public SurveyAppConString(string connectionString) : base(connectionString, "SurveyAppConString")
        {
            this.ContextOptions.LazyLoadingEnabled = true;
            OnContextCreated();
        }
    
        /// <summary>
        /// Initialize a new SurveyAppConString object.
        /// </summary>
        public SurveyAppConString(EntityConnection connection) : base(connection, "SurveyAppConString")
        {
            this.ContextOptions.LazyLoadingEnabled = true;
            OnContextCreated();
        }
    
        #endregion
    
        #region Partial Methods
    
        partial void OnContextCreated();
    
        #endregion
    
        #region ObjectSet Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<Question> Questions
        {
            get
            {
                if ((_Questions == null))
                {
                    _Questions = base.CreateObjectSet<Question>("Questions");
                }
                return _Questions;
            }
        }
        private ObjectSet<Question> _Questions;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<Role> Roles
        {
            get
            {
                if ((_Roles == null))
                {
                    _Roles = base.CreateObjectSet<Role>("Roles");
                }
                return _Roles;
            }
        }
        private ObjectSet<Role> _Roles;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<Survey> Surveys
        {
            get
            {
                if ((_Surveys == null))
                {
                    _Surveys = base.CreateObjectSet<Survey>("Surveys");
                }
                return _Surveys;
            }
        }
        private ObjectSet<Survey> _Surveys;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<sysdiagram> sysdiagrams
        {
            get
            {
                if ((_sysdiagrams == null))
                {
                    _sysdiagrams = base.CreateObjectSet<sysdiagram>("sysdiagrams");
                }
                return _sysdiagrams;
            }
        }
        private ObjectSet<sysdiagram> _sysdiagrams;
    
        /// <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<Survey_Response> Survey_Response
        {
            get
            {
                if ((_Survey_Response == null))
                {
                    _Survey_Response = base.CreateObjectSet<Survey_Response>("Survey_Response");
                }
                return _Survey_Response;
            }
        }
        private ObjectSet<Survey_Response> _Survey_Response;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<SurveyQuestion> SurveyQuestions
        {
            get
            {
                if ((_SurveyQuestions == null))
                {
                    _SurveyQuestions = base.CreateObjectSet<SurveyQuestion>("SurveyQuestions");
                }
                return _SurveyQuestions;
            }
        }
        private ObjectSet<SurveyQuestion> _SurveyQuestions;

        #endregion

        #region AddTo Methods
    
        /// <summary>
        /// Deprecated Method for adding a new object to the Questions EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToQuestions(Question question)
        {
            base.AddObject("Questions", question);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the Roles EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToRoles(Role role)
        {
            base.AddObject("Roles", role);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the Surveys EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToSurveys(Survey survey)
        {
            base.AddObject("Surveys", survey);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the sysdiagrams EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddTosysdiagrams(sysdiagram sysdiagram)
        {
            base.AddObject("sysdiagrams", sysdiagram);
        }
    
        /// <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 Survey_Response EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToSurvey_Response(Survey_Response survey_Response)
        {
            base.AddObject("Survey_Response", survey_Response);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the SurveyQuestions EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToSurveyQuestions(SurveyQuestion surveyQuestion)
        {
            base.AddObject("SurveyQuestions", surveyQuestion);
        }

        #endregion

    }

    #endregion

    #region Entities
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="SurveyAppModel", Name="Question")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class Question : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new Question object.
        /// </summary>
        /// <param name="id">Initial value of the ID property.</param>
        /// <param name="text">Initial value of the Text property.</param>
        /// <param name="questionType">Initial value of the QuestionType property.</param>
        /// <param name="options">Initial value of the Options property.</param>
        public static Question CreateQuestion(global::System.Int32 id, global::System.String text, global::System.String questionType, global::System.String options)
        {
            Question question = new Question();
            question.ID = id;
            question.Text = text;
            question.QuestionType = questionType;
            question.Options = options;
            return question;
        }

        #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.String Text
        {
            get
            {
                return _Text;
            }
            set
            {
                OnTextChanging(value);
                ReportPropertyChanging("Text");
                _Text = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Text");
                OnTextChanged();
            }
        }
        private global::System.String _Text;
        partial void OnTextChanging(global::System.String value);
        partial void OnTextChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String QuestionType
        {
            get
            {
                return _QuestionType;
            }
            set
            {
                OnQuestionTypeChanging(value);
                ReportPropertyChanging("QuestionType");
                _QuestionType = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("QuestionType");
                OnQuestionTypeChanged();
            }
        }
        private global::System.String _QuestionType;
        partial void OnQuestionTypeChanging(global::System.String value);
        partial void OnQuestionTypeChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String Options
        {
            get
            {
                return _Options;
            }
            set
            {
                OnOptionsChanging(value);
                ReportPropertyChanging("Options");
                _Options = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Options");
                OnOptionsChanged();
            }
        }
        private global::System.String _Options;
        partial void OnOptionsChanging(global::System.String value);
        partial void OnOptionsChanged();

        #endregion

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

        #endregion

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

        #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.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

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

        #endregion

    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="SurveyAppModel", Name="Survey")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class Survey : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new Survey object.
        /// </summary>
        /// <param name="id">Initial value of the ID property.</param>
        /// <param name="description">Initial value of the Description property.</param>
        /// <param name="createdOn">Initial value of the CreatedOn property.</param>
        /// <param name="createdBy">Initial value of the CreatedBy property.</param>
        /// <param name="publish">Initial value of the Publish property.</param>
        public static Survey CreateSurvey(global::System.Int32 id, global::System.String description, global::System.DateTime createdOn, global::System.Int32 createdBy, global::System.Boolean publish)
        {
            Survey survey = new Survey();
            survey.ID = id;
            survey.Description = description;
            survey.CreatedOn = createdOn;
            survey.CreatedBy = createdBy;
            survey.Publish = publish;
            return survey;
        }

        #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=true)]
        [DataMemberAttribute()]
        public global::System.String Title
        {
            get
            {
                return _Title;
            }
            set
            {
                OnTitleChanging(value);
                ReportPropertyChanging("Title");
                _Title = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Title");
                OnTitleChanged();
            }
        }
        private global::System.String _Title;
        partial void OnTitleChanging(global::System.String value);
        partial void OnTitleChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String Description
        {
            get
            {
                return _Description;
            }
            set
            {
                OnDescriptionChanging(value);
                ReportPropertyChanging("Description");
                _Description = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Description");
                OnDescriptionChanged();
            }
        }
        private global::System.String _Description;
        partial void OnDescriptionChanging(global::System.String value);
        partial void OnDescriptionChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.DateTime CreatedOn
        {
            get
            {
                return _CreatedOn;
            }
            set
            {
                OnCreatedOnChanging(value);
                ReportPropertyChanging("CreatedOn");
                _CreatedOn = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("CreatedOn");
                OnCreatedOnChanged();
            }
        }
        private global::System.DateTime _CreatedOn;
        partial void OnCreatedOnChanging(global::System.DateTime value);
        partial void OnCreatedOnChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.DateTime> ExpiresOn
        {
            get
            {
                return _ExpiresOn;
            }
            set
            {
                OnExpiresOnChanging(value);
                ReportPropertyChanging("ExpiresOn");
                _ExpiresOn = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("ExpiresOn");
                OnExpiresOnChanged();
            }
        }
        private Nullable<global::System.DateTime> _ExpiresOn;
        partial void OnExpiresOnChanging(Nullable<global::System.DateTime> value);
        partial void OnExpiresOnChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 CreatedBy
        {
            get
            {
                return _CreatedBy;
            }
            set
            {
                OnCreatedByChanging(value);
                ReportPropertyChanging("CreatedBy");
                _CreatedBy = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("CreatedBy");
                OnCreatedByChanged();
            }
        }
        private global::System.Int32 _CreatedBy;
        partial void OnCreatedByChanging(global::System.Int32 value);
        partial void OnCreatedByChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Boolean Publish
        {
            get
            {
                return _Publish;
            }
            set
            {
                OnPublishChanging(value);
                ReportPropertyChanging("Publish");
                _Publish = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Publish");
                OnPublishChanged();
            }
        }
        private global::System.Boolean _Publish;
        partial void OnPublishChanging(global::System.Boolean value);
        partial void OnPublishChanged();

        #endregion

    
        #region Navigation Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("SurveyAppModel", "FK_Surveys_Users", "Users")]
        public User User
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<User>("SurveyAppModel.FK_Surveys_Users", "Users").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<User>("SurveyAppModel.FK_Surveys_Users", "Users").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<User> UserReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<User>("SurveyAppModel.FK_Surveys_Users", "Users");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<User>("SurveyAppModel.FK_Surveys_Users", "Users", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("SurveyAppModel", "FK_Survey_Response_Surveys", "Survey_Response")]
        public EntityCollection<Survey_Response> Survey_Response
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<Survey_Response>("SurveyAppModel.FK_Survey_Response_Surveys", "Survey_Response");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<Survey_Response>("SurveyAppModel.FK_Survey_Response_Surveys", "Survey_Response", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("SurveyAppModel", "FK_SurveyQuestions_Surveys", "SurveyQuestion")]
        public EntityCollection<SurveyQuestion> SurveyQuestions
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<SurveyQuestion>("SurveyAppModel.FK_SurveyQuestions_Surveys", "SurveyQuestion");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<SurveyQuestion>("SurveyAppModel.FK_SurveyQuestions_Surveys", "SurveyQuestion", value);
                }
            }
        }

        #endregion

    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="SurveyAppModel", Name="Survey_Response")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class Survey_Response : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new Survey_Response object.
        /// </summary>
        /// <param name="id">Initial value of the ID property.</param>
        /// <param name="surveyID">Initial value of the SurveyID property.</param>
        /// <param name="questionID">Initial value of the QuestionID property.</param>
        /// <param name="response">Initial value of the Response property.</param>
        /// <param name="filledBy">Initial value of the FilledBy property.</param>
        public static Survey_Response CreateSurvey_Response(global::System.Int32 id, global::System.Int32 surveyID, global::System.Int32 questionID, global::System.String response, global::System.Int32 filledBy)
        {
            Survey_Response survey_Response = new Survey_Response();
            survey_Response.ID = id;
            survey_Response.SurveyID = surveyID;
            survey_Response.QuestionID = questionID;
            survey_Response.Response = response;
            survey_Response.FilledBy = filledBy;
            return survey_Response;
        }

        #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.Int32 SurveyID
        {
            get
            {
                return _SurveyID;
            }
            set
            {
                OnSurveyIDChanging(value);
                ReportPropertyChanging("SurveyID");
                _SurveyID = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("SurveyID");
                OnSurveyIDChanged();
            }
        }
        private global::System.Int32 _SurveyID;
        partial void OnSurveyIDChanging(global::System.Int32 value);
        partial void OnSurveyIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 QuestionID
        {
            get
            {
                return _QuestionID;
            }
            set
            {
                OnQuestionIDChanging(value);
                ReportPropertyChanging("QuestionID");
                _QuestionID = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("QuestionID");
                OnQuestionIDChanged();
            }
        }
        private global::System.Int32 _QuestionID;
        partial void OnQuestionIDChanging(global::System.Int32 value);
        partial void OnQuestionIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String Response
        {
            get
            {
                return _Response;
            }
            set
            {
                OnResponseChanging(value);
                ReportPropertyChanging("Response");
                _Response = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Response");
                OnResponseChanged();
            }
        }
        private global::System.String _Response;
        partial void OnResponseChanging(global::System.String value);
        partial void OnResponseChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 FilledBy
        {
            get
            {
                return _FilledBy;
            }
            set
            {
                OnFilledByChanging(value);
                ReportPropertyChanging("FilledBy");
                _FilledBy = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("FilledBy");
                OnFilledByChanged();
            }
        }
        private global::System.Int32 _FilledBy;
        partial void OnFilledByChanging(global::System.Int32 value);
        partial void OnFilledByChanged();

        #endregion

    
        #region Navigation Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("SurveyAppModel", "FK_Survey_Response_Questions", "Question")]
        public Question Question
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Question>("SurveyAppModel.FK_Survey_Response_Questions", "Question").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Question>("SurveyAppModel.FK_Survey_Response_Questions", "Question").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Question> QuestionReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Question>("SurveyAppModel.FK_Survey_Response_Questions", "Question");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Question>("SurveyAppModel.FK_Survey_Response_Questions", "Question", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("SurveyAppModel", "FK_Survey_Response_Surveys", "Survey")]
        public Survey Survey
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Survey>("SurveyAppModel.FK_Survey_Response_Surveys", "Survey").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Survey>("SurveyAppModel.FK_Survey_Response_Surveys", "Survey").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Survey> SurveyReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Survey>("SurveyAppModel.FK_Survey_Response_Surveys", "Survey");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Survey>("SurveyAppModel.FK_Survey_Response_Surveys", "Survey", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("SurveyAppModel", "FK_Survey_Response_Users", "User")]
        public User User
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<User>("SurveyAppModel.FK_Survey_Response_Users", "User").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<User>("SurveyAppModel.FK_Survey_Response_Users", "User").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<User> UserReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<User>("SurveyAppModel.FK_Survey_Response_Users", "User");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<User>("SurveyAppModel.FK_Survey_Response_Users", "User", value);
                }
            }
        }

        #endregion

    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="SurveyAppModel", Name="SurveyQuestion")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class SurveyQuestion : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new SurveyQuestion object.
        /// </summary>
        /// <param name="id">Initial value of the ID property.</param>
        /// <param name="surveyID">Initial value of the SurveyID property.</param>
        /// <param name="questionID">Initial value of the QuestionID property.</param>
        public static SurveyQuestion CreateSurveyQuestion(global::System.Int32 id, global::System.Int32 surveyID, global::System.Int32 questionID)
        {
            SurveyQuestion surveyQuestion = new SurveyQuestion();
            surveyQuestion.ID = id;
            surveyQuestion.SurveyID = surveyID;
            surveyQuestion.QuestionID = questionID;
            return surveyQuestion;
        }

        #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.Int32 SurveyID
        {
            get
            {
                return _SurveyID;
            }
            set
            {
                OnSurveyIDChanging(value);
                ReportPropertyChanging("SurveyID");
                _SurveyID = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("SurveyID");
                OnSurveyIDChanged();
            }
        }
        private global::System.Int32 _SurveyID;
        partial void OnSurveyIDChanging(global::System.Int32 value);
        partial void OnSurveyIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 QuestionID
        {
            get
            {
                return _QuestionID;
            }
            set
            {
                OnQuestionIDChanging(value);
                ReportPropertyChanging("QuestionID");
                _QuestionID = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("QuestionID");
                OnQuestionIDChanged();
            }
        }
        private global::System.Int32 _QuestionID;
        partial void OnQuestionIDChanging(global::System.Int32 value);
        partial void OnQuestionIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> OrderID
        {
            get
            {
                return _OrderID;
            }
            set
            {
                OnOrderIDChanging(value);
                ReportPropertyChanging("OrderID");
                _OrderID = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("OrderID");
                OnOrderIDChanged();
            }
        }
        private Nullable<global::System.Int32> _OrderID;
        partial void OnOrderIDChanging(Nullable<global::System.Int32> value);
        partial void OnOrderIDChanged();

        #endregion

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

        #endregion

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

        #endregion

        #region Primitive Properties
    
        /// <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.Int32 principal_id
        {
            get
            {
                return _principal_id;
            }
            set
            {
                Onprincipal_idChanging(value);
                ReportPropertyChanging("principal_id");
                _principal_id = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("principal_id");
                Onprincipal_idChanged();
            }
        }
        private global::System.Int32 _principal_id;
        partial void Onprincipal_idChanging(global::System.Int32 value);
        partial void Onprincipal_idChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 diagram_id
        {
            get
            {
                return _diagram_id;
            }
            set
            {
                if (_diagram_id != value)
                {
                    Ondiagram_idChanging(value);
                    ReportPropertyChanging("diagram_id");
                    _diagram_id = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("diagram_id");
                    Ondiagram_idChanged();
                }
            }
        }
        private global::System.Int32 _diagram_id;
        partial void Ondiagram_idChanging(global::System.Int32 value);
        partial void Ondiagram_idChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> version
        {
            get
            {
                return _version;
            }
            set
            {
                OnversionChanging(value);
                ReportPropertyChanging("version");
                _version = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("version");
                OnversionChanged();
            }
        }
        private Nullable<global::System.Int32> _version;
        partial void OnversionChanging(Nullable<global::System.Int32> value);
        partial void OnversionChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.Byte[] definition
        {
            get
            {
                return StructuralObject.GetValidValue(_definition);
            }
            set
            {
                OndefinitionChanging(value);
                ReportPropertyChanging("definition");
                _definition = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("definition");
                OndefinitionChanged();
            }
        }
        private global::System.Byte[] _definition;
        partial void OndefinitionChanging(global::System.Byte[] value);
        partial void OndefinitionChanged();

        #endregion

    
    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="SurveyAppModel", 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="firstName">Initial value of the FirstName property.</param>
        /// <param name="userName">Initial value of the UserName property.</param>
        /// <param name="password">Initial value of the Password property.</param>
        /// <param name="role">Initial value of the Role property.</param>
        public static User CreateUser(global::System.Int32 id, global::System.String firstName, global::System.String userName, global::System.String password, global::System.Int32 role)
        {
            User user = new User();
            user.ID = id;
            user.FirstName = firstName;
            user.UserName = userName;
            user.Password = password;
            user.Role = role;
            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.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=true)]
        [DataMemberAttribute()]
        public global::System.String LastName
        {
            get
            {
                return _LastName;
            }
            set
            {
                OnLastNameChanging(value);
                ReportPropertyChanging("LastName");
                _LastName = StructuralObject.SetValidValue(value, true);
                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=false)]
        [DataMemberAttribute()]
        public global::System.String UserName
        {
            get
            {
                return _UserName;
            }
            set
            {
                OnUserNameChanging(value);
                ReportPropertyChanging("UserName");
                _UserName = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("UserName");
                OnUserNameChanged();
            }
        }
        private global::System.String _UserName;
        partial void OnUserNameChanging(global::System.String value);
        partial void OnUserNameChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String Password
        {
            get
            {
                return _Password;
            }
            set
            {
                OnPasswordChanging(value);
                ReportPropertyChanging("Password");
                _Password = StructuralObject.SetValidValue(value, false);
                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=false)]
        [DataMemberAttribute()]
        public global::System.Int32 Role
        {
            get
            {
                return _Role;
            }
            set
            {
                OnRoleChanging(value);
                ReportPropertyChanging("Role");
                _Role = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Role");
                OnRoleChanged();
            }
        }
        private global::System.Int32 _Role;
        partial void OnRoleChanging(global::System.Int32 value);
        partial void OnRoleChanged();

        #endregion

    
        #region Navigation Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("SurveyAppModel", "FK_Users_Roles", "Roles")]
        public Role Role1
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Role>("SurveyAppModel.FK_Users_Roles", "Roles").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Role>("SurveyAppModel.FK_Users_Roles", "Roles").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Role> Role1Reference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Role>("SurveyAppModel.FK_Users_Roles", "Roles");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Role>("SurveyAppModel.FK_Users_Roles", "Roles", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("SurveyAppModel", "FK_Surveys_Users", "Surveys")]
        public EntityCollection<Survey> Surveys
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<Survey>("SurveyAppModel.FK_Surveys_Users", "Surveys");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<Survey>("SurveyAppModel.FK_Surveys_Users", "Surveys", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("SurveyAppModel", "FK_Survey_Response_Users", "Survey_Response")]
        public EntityCollection<Survey_Response> Survey_Response
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<Survey_Response>("SurveyAppModel.FK_Survey_Response_Users", "Survey_Response");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<Survey_Response>("SurveyAppModel.FK_Survey_Response_Users", "Survey_Response", value);
                }
            }
        }

        #endregion

    }

    #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 Code Project Open License (CPOL)



Comments and Discussions