Mvc4Model.Designer.cs


Dosyayı İndir
//------------------------------------------------------------------------------
// <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()]
#region EDM Relationship Metadata

[assembly: EdmRelationshipAttribute("Mvc4DbModel", "FK_Product_Category", "Category", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(SampleMvc4Application.Category), "Product", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(SampleMvc4Application.Product), true)]

#endregion

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

        #endregion
        #region AddTo Methods
    
        /// <summary>
        /// Deprecated Method for adding a new object to the Samples EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToSamples(Sample sample)
        {
            base.AddObject("Samples", sample);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the Categories EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToCategories(Category category)
        {
            base.AddObject("Categories", category);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the Products EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToProducts(Product product)
        {
            base.AddObject("Products", product);
        }

        #endregion
    }
    

    #endregion
    
    #region Entities
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="Mvc4DbModel", Name="Category")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class Category : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new Category object.
        /// </summary>
        /// <param name="categoryId">Initial value of the CategoryId property.</param>
        public static Category CreateCategory(global::System.Int64 categoryId)
        {
            Category category = new Category();
            category.CategoryId = categoryId;
            return category;
        }

        #endregion
        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int64 CategoryId
        {
            get
            {
                return _CategoryId;
            }
            set
            {
                if (_CategoryId != value)
                {
                    OnCategoryIdChanging(value);
                    ReportPropertyChanging("CategoryId");
                    _CategoryId = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("CategoryId");
                    OnCategoryIdChanged();
                }
            }
        }
        private global::System.Int64 _CategoryId;
        partial void OnCategoryIdChanging(global::System.Int64 value);
        partial void OnCategoryIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String CategoryName
        {
            get
            {
                return _CategoryName;
            }
            set
            {
                OnCategoryNameChanging(value);
                ReportPropertyChanging("CategoryName");
                _CategoryName = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("CategoryName");
                OnCategoryNameChanged();
            }
        }
        private global::System.String _CategoryName;
        partial void OnCategoryNameChanging(global::System.String value);
        partial void OnCategoryNameChanged();

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

        #endregion
    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="Mvc4DbModel", Name="Product")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class Product : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new Product object.
        /// </summary>
        /// <param name="productId">Initial value of the ProductId property.</param>
        public static Product CreateProduct(global::System.Int64 productId)
        {
            Product product = new Product();
            product.ProductId = productId;
            return product;
        }

        #endregion
        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int64 ProductId
        {
            get
            {
                return _ProductId;
            }
            set
            {
                if (_ProductId != value)
                {
                    OnProductIdChanging(value);
                    ReportPropertyChanging("ProductId");
                    _ProductId = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("ProductId");
                    OnProductIdChanged();
                }
            }
        }
        private global::System.Int64 _ProductId;
        partial void OnProductIdChanging(global::System.Int64 value);
        partial void OnProductIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String ProductName
        {
            get
            {
                return _ProductName;
            }
            set
            {
                OnProductNameChanging(value);
                ReportPropertyChanging("ProductName");
                _ProductName = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("ProductName");
                OnProductNameChanged();
            }
        }
        private global::System.String _ProductName;
        partial void OnProductNameChanging(global::System.String value);
        partial void OnProductNameChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Double> SalesPrice
        {
            get
            {
                return _SalesPrice;
            }
            set
            {
                OnSalesPriceChanging(value);
                ReportPropertyChanging("SalesPrice");
                _SalesPrice = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("SalesPrice");
                OnSalesPriceChanged();
            }
        }
        private Nullable<global::System.Double> _SalesPrice;
        partial void OnSalesPriceChanging(Nullable<global::System.Double> value);
        partial void OnSalesPriceChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int64> CategoryId
        {
            get
            {
                return _CategoryId;
            }
            set
            {
                OnCategoryIdChanging(value);
                ReportPropertyChanging("CategoryId");
                _CategoryId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("CategoryId");
                OnCategoryIdChanged();
            }
        }
        private Nullable<global::System.Int64> _CategoryId;
        partial void OnCategoryIdChanging(Nullable<global::System.Int64> value);
        partial void OnCategoryIdChanged();

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

        #endregion
    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="Mvc4DbModel", Name="Sample")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class Sample : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new Sample object.
        /// </summary>
        /// <param name="sampleId">Initial value of the SampleId property.</param>
        public static Sample CreateSample(global::System.Int64 sampleId)
        {
            Sample sample = new Sample();
            sample.SampleId = sampleId;
            return sample;
        }

        #endregion
        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        [DisplayName("Örnek No")]
        public global::System.Int64 SampleId
        {
            get
            {
                return _SampleId;
            }
            set
            {
                if (_SampleId != value)
                {
                    OnSampleIdChanging(value);
                    ReportPropertyChanging("SampleId");
                    _SampleId = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("SampleId");
                    OnSampleIdChanged();
                }
            }
        }
        private global::System.Int64 _SampleId;
        partial void OnSampleIdChanging(global::System.Int64 value);
        partial void OnSampleIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        [DisplayName("Örnek Adı")]
        public global::System.String SampleName
        {
            get
            {
                return _SampleName;
            }
            set
            {
                OnSampleNameChanging(value);
                ReportPropertyChanging("SampleName");
                _SampleName = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("SampleName");
                OnSampleNameChanged();
            }
        }
        private global::System.String _SampleName;
        partial void OnSampleNameChanging(global::System.String value);
        partial void OnSampleNameChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        [DisplayName("Örnek Değer")]
        public Nullable<global::System.Double> SampleValue
        {
            get
            {
                return _SampleValue;
            }
            set
            {
                OnSampleValueChanging(value);
                ReportPropertyChanging("SampleValue");
                _SampleValue = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("SampleValue");
                OnSampleValueChanged();
            }
        }
        private Nullable<global::System.Double> _SampleValue;
        partial void OnSampleValueChanging(Nullable<global::System.Double> value);
        partial void OnSampleValueChanged();

        #endregion
    
    }

    #endregion
    
}

				
Dosyayı İndir

Bu Sayfayı Paylaş:




Bu Sayfayı Paylaş:

İletişim Bilgileri

Takip Et

Her Hakkı Saklıdır. Bu sitede yayınlanan tüm bilgi ve fikirlerin kullanımından fibiler.com sorumlu değildir. Bu sitede üretilmiş , derlenmiş içerikleri, fibiler.com'u kaynak göstermek koşuluyla kendi sitenizde kullanılabilirsiniz. Ancak telif hakkı olan içeriklerin hakları sahiplerine aittir