Click here to Skip to main content
12,633,764 members (31,633 online)
Click here to Skip to main content
Articles » Web Development » ASP.NET » General » Downloads

Stats

34.3K views
380 downloads
17 bookmarked
Posted

Entity Framework Implementation Using ASP.NET MVP

, 13 May 2011 GPL3
Entity Framework Implementation using ASP.NET MVP
TestMVPApp
TestMVPApp.5.1.ReSharper.user
TestMVPApp.suo
TestMVPApp
bin
Model
TestModel.edmx
obj
Debug
DesignTimeResolveAssemblyReferencesInput.cache
edmxResourcesToEmbed
Model
ModelData.csdl
ModelData.msl
ModelData.ssdl
ModelEntity.csdl
ModelEntity.msl
ModelEntity.ssdl
TestModel.csdl
TestModel.msl
TestModel.ssdl
ResolveAssemblyReference.cache
TempPE
Model.ModelData.Designer.cs.dll
Model.ModelEntity.Designer.cs.dll
Model.TestModel.Designer.cs.dll
TestMVPApp.dll
TestMVPApp.pdb
Presenter
Properties
StyleCop.Cache
TestMVPApp.csproj.user
View
//------------------------------------------------------------------------------
// <auto-generated>
//    This code was generated from a template.
//
//    Manual changes to this file may cause unexpected behavior in your application.
//    Manual changes to this file will be overwritten if the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

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

[assembly: EdmSchemaAttribute()]

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

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

        #endregion
    }
    

    #endregion
    
    #region Entities
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="TestDBModel", Name="Tbl_UserDetails")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class Tbl_UserDetails : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new Tbl_UserDetails object.
        /// </summary>
        /// <param name="uID">Initial value of the UID property.</param>
        public static Tbl_UserDetails CreateTbl_UserDetails(global::System.Int32 uID)
        {
            Tbl_UserDetails tbl_UserDetails = new Tbl_UserDetails();
            tbl_UserDetails.UID = uID;
            return tbl_UserDetails;
        }

        #endregion
        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 UID
        {
            get
            {
                return _UID;
            }
            set
            {
                if (_UID != value)
                {
                    OnUIDChanging(value);
                    ReportPropertyChanging("UID");
                    _UID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("UID");
                    OnUIDChanged();
                }
            }
        }
        private global::System.Int32 _UID;
        partial void OnUIDChanging(global::System.Int32 value);
        partial void OnUIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String FirstName
        {
            get
            {
                return _FirstName;
            }
            set
            {
                OnFirstNameChanging(value);
                ReportPropertyChanging("FirstName");
                _FirstName = StructuralObject.SetValidValue(value, true);
                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 MiddleName
        {
            get
            {
                return _MiddleName;
            }
            set
            {
                OnMiddleNameChanging(value);
                ReportPropertyChanging("MiddleName");
                _MiddleName = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("MiddleName");
                OnMiddleNameChanged();
            }
        }
        private global::System.String _MiddleName;
        partial void OnMiddleNameChanging(global::System.String value);
        partial void OnMiddleNameChanged();
    
        /// <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=true)]
        [DataMemberAttribute()]
        public global::System.String Address
        {
            get
            {
                return _Address;
            }
            set
            {
                OnAddressChanging(value);
                ReportPropertyChanging("Address");
                _Address = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Address");
                OnAddressChanged();
            }
        }
        private global::System.String _Address;
        partial void OnAddressChanging(global::System.String value);
        partial void OnAddressChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String ContactNo
        {
            get
            {
                return _ContactNo;
            }
            set
            {
                OnContactNoChanging(value);
                ReportPropertyChanging("ContactNo");
                _ContactNo = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("ContactNo");
                OnContactNoChanged();
            }
        }
        private global::System.String _ContactNo;
        partial void OnContactNoChanging(global::System.String value);
        partial void OnContactNoChanged();

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

Share

About the Author

Neerajan Lamsal
Software Developer
Nepal Nepal
I am a software developer with knowledge of C, C++, PHP, MySQL, C#.Net, ADO.Net, MSSQL Server, Crystal Reports, Asp.Net, Oracle, Asp.Net MVP, MVC, jQuery, javascript, WebService, WCF, Entity Framework and so on. I love to play on New Technologies.

You may also be interested in...

Pro
Pro
| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.161208.2 | Last Updated 14 May 2011
Article Copyright 2011 by Neerajan Lamsal
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid