﻿//------------------------------------------------------------------------------
// <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("MDEntitiesModel", "MDEntities_ProductMDEntities_Product_PicturesCol", "MDEntities_Product", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(DalEf.MDEntities_Product), "MDEntities_Product_PicturesCol", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(DalEf.MDEntities_Product_PicturesCol), true)]
[assembly: EdmRelationshipAttribute("MDEntitiesModel", "Documents_PriceList_ForEntitiesDocuments_PriceList_ItemsCol_ForEntities", "Documents_PriceList_ForEntities", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(DalEf.Documents_PriceList_ForEntities), "Documents_PriceList_ItemsCol_ForEntities", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(DalEf.Documents_PriceList_ItemsCol_ForEntities), true)]

#endregion

namespace DalEf
{
    #region Contexts
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    public partial class MDEntitiesEntities : ObjectContext
    {
        #region Constructors
    
        /// <summary>
        /// Initializes a new MDEntitiesEntities object using the connection string found in the 'MDEntitiesEntities' section of the application configuration file.
        /// </summary>
        public MDEntitiesEntities() : base("name=MDEntitiesEntities", "MDEntitiesEntities")
        {
            this.ContextOptions.LazyLoadingEnabled = true;
            OnContextCreated();
        }
    
        /// <summary>
        /// Initialize a new MDEntitiesEntities object.
        /// </summary>
        public MDEntitiesEntities(string connectionString) : base(connectionString, "MDEntitiesEntities")
        {
            this.ContextOptions.LazyLoadingEnabled = true;
            OnContextCreated();
        }
    
        /// <summary>
        /// Initialize a new MDEntitiesEntities object.
        /// </summary>
        public MDEntitiesEntities(EntityConnection connection) : base(connection, "MDEntitiesEntities")
        {
            this.ContextOptions.LazyLoadingEnabled = true;
            OnContextCreated();
        }
    
        #endregion
    
        #region Partial Methods
    
        partial void OnContextCreated();
    
        #endregion
    
        #region ObjectSet Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<MDEntities_Entity> MDEntities_Entity
        {
            get
            {
                if ((_MDEntities_Entity == null))
                {
                    _MDEntities_Entity = base.CreateObjectSet<MDEntities_Entity>("MDEntities_Entity");
                }
                return _MDEntities_Entity;
            }
        }
        private ObjectSet<MDEntities_Entity> _MDEntities_Entity;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<MDEntities_Enums_EntityGroup> MDEntities_Enums_EntityGroup
        {
            get
            {
                if ((_MDEntities_Enums_EntityGroup == null))
                {
                    _MDEntities_Enums_EntityGroup = base.CreateObjectSet<MDEntities_Enums_EntityGroup>("MDEntities_Enums_EntityGroup");
                }
                return _MDEntities_Enums_EntityGroup;
            }
        }
        private ObjectSet<MDEntities_Enums_EntityGroup> _MDEntities_Enums_EntityGroup;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<MDEntities_Enums_Unit> MDEntities_Enums_Unit
        {
            get
            {
                if ((_MDEntities_Enums_Unit == null))
                {
                    _MDEntities_Enums_Unit = base.CreateObjectSet<MDEntities_Enums_Unit>("MDEntities_Enums_Unit");
                }
                return _MDEntities_Enums_Unit;
            }
        }
        private ObjectSet<MDEntities_Enums_Unit> _MDEntities_Enums_Unit;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<MDEntities_Product_PicturesCol> MDEntities_Product_PicturesCol
        {
            get
            {
                if ((_MDEntities_Product_PicturesCol == null))
                {
                    _MDEntities_Product_PicturesCol = base.CreateObjectSet<MDEntities_Product_PicturesCol>("MDEntities_Product_PicturesCol");
                }
                return _MDEntities_Product_PicturesCol;
            }
        }
        private ObjectSet<MDEntities_Product_PicturesCol> _MDEntities_Product_PicturesCol;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<MDEntities_Enums_TaxRate> MDEntities_Enums_TaxRate
        {
            get
            {
                if ((_MDEntities_Enums_TaxRate == null))
                {
                    _MDEntities_Enums_TaxRate = base.CreateObjectSet<MDEntities_Enums_TaxRate>("MDEntities_Enums_TaxRate");
                }
                return _MDEntities_Enums_TaxRate;
            }
        }
        private ObjectSet<MDEntities_Enums_TaxRate> _MDEntities_Enums_TaxRate;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<vEnums_TaxRate> vEnums_TaxRate
        {
            get
            {
                if ((_vEnums_TaxRate == null))
                {
                    _vEnums_TaxRate = base.CreateObjectSet<vEnums_TaxRate>("vEnums_TaxRate");
                }
                return _vEnums_TaxRate;
            }
        }
        private ObjectSet<vEnums_TaxRate> _vEnums_TaxRate;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<vEnums_Unit> vEnums_Unit
        {
            get
            {
                if ((_vEnums_Unit == null))
                {
                    _vEnums_Unit = base.CreateObjectSet<vEnums_Unit>("vEnums_Unit");
                }
                return _vEnums_Unit;
            }
        }
        private ObjectSet<vEnums_Unit> _vEnums_Unit;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<vEntities> vEntities
        {
            get
            {
                if ((_vEntities == null))
                {
                    _vEntities = base.CreateObjectSet<vEntities>("vEntities");
                }
                return _vEntities;
            }
        }
        private ObjectSet<vEntities> _vEntities;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<Documents_Document_ForEntities> Documents_Document_ForEntities
        {
            get
            {
                if ((_Documents_Document_ForEntities == null))
                {
                    _Documents_Document_ForEntities = base.CreateObjectSet<Documents_Document_ForEntities>("Documents_Document_ForEntities");
                }
                return _Documents_Document_ForEntities;
            }
        }
        private ObjectSet<Documents_Document_ForEntities> _Documents_Document_ForEntities;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<Documents_PriceList_ItemsCol_ForEntities> Documents_PriceList_ItemsCol_ForEntities
        {
            get
            {
                if ((_Documents_PriceList_ItemsCol_ForEntities == null))
                {
                    _Documents_PriceList_ItemsCol_ForEntities = base.CreateObjectSet<Documents_PriceList_ItemsCol_ForEntities>("Documents_PriceList_ItemsCol_ForEntities");
                }
                return _Documents_PriceList_ItemsCol_ForEntities;
            }
        }
        private ObjectSet<Documents_PriceList_ItemsCol_ForEntities> _Documents_PriceList_ItemsCol_ForEntities;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<MDEntities_SifreNamjena> MDEntities_SifreNamjena
        {
            get
            {
                if ((_MDEntities_SifreNamjena == null))
                {
                    _MDEntities_SifreNamjena = base.CreateObjectSet<MDEntities_SifreNamjena>("MDEntities_SifreNamjena");
                }
                return _MDEntities_SifreNamjena;
            }
        }
        private ObjectSet<MDEntities_SifreNamjena> _MDEntities_SifreNamjena;

        #endregion

        #region AddTo Methods
    
        /// <summary>
        /// Deprecated Method for adding a new object to the MDEntities_Entity EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToMDEntities_Entity(MDEntities_Entity mDEntities_Entity)
        {
            base.AddObject("MDEntities_Entity", mDEntities_Entity);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the MDEntities_Enums_EntityGroup EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToMDEntities_Enums_EntityGroup(MDEntities_Enums_EntityGroup mDEntities_Enums_EntityGroup)
        {
            base.AddObject("MDEntities_Enums_EntityGroup", mDEntities_Enums_EntityGroup);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the MDEntities_Enums_Unit EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToMDEntities_Enums_Unit(MDEntities_Enums_Unit mDEntities_Enums_Unit)
        {
            base.AddObject("MDEntities_Enums_Unit", mDEntities_Enums_Unit);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the MDEntities_Product_PicturesCol EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToMDEntities_Product_PicturesCol(MDEntities_Product_PicturesCol mDEntities_Product_PicturesCol)
        {
            base.AddObject("MDEntities_Product_PicturesCol", mDEntities_Product_PicturesCol);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the MDEntities_Enums_TaxRate EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToMDEntities_Enums_TaxRate(MDEntities_Enums_TaxRate mDEntities_Enums_TaxRate)
        {
            base.AddObject("MDEntities_Enums_TaxRate", mDEntities_Enums_TaxRate);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the vEnums_TaxRate EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddTovEnums_TaxRate(vEnums_TaxRate vEnums_TaxRate)
        {
            base.AddObject("vEnums_TaxRate", vEnums_TaxRate);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the vEnums_Unit EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddTovEnums_Unit(vEnums_Unit vEnums_Unit)
        {
            base.AddObject("vEnums_Unit", vEnums_Unit);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the vEntities EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddTovEntities(vEntities vEntities)
        {
            base.AddObject("vEntities", vEntities);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the Documents_Document_ForEntities EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToDocuments_Document_ForEntities(Documents_Document_ForEntities documents_Document_ForEntities)
        {
            base.AddObject("Documents_Document_ForEntities", documents_Document_ForEntities);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the Documents_PriceList_ItemsCol_ForEntities EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToDocuments_PriceList_ItemsCol_ForEntities(Documents_PriceList_ItemsCol_ForEntities documents_PriceList_ItemsCol_ForEntities)
        {
            base.AddObject("Documents_PriceList_ItemsCol_ForEntities", documents_PriceList_ItemsCol_ForEntities);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the MDEntities_SifreNamjena EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToMDEntities_SifreNamjena(MDEntities_SifreNamjena mDEntities_SifreNamjena)
        {
            base.AddObject("MDEntities_SifreNamjena", mDEntities_SifreNamjena);
        }

        #endregion

    }

    #endregion

    #region Entities
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="MDEntitiesModel", Name="Documents_Document_ForEntities")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    [KnownTypeAttribute(typeof(Documents_PriceList_ForEntities))]
    public partial class Documents_Document_ForEntities : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new Documents_Document_ForEntities object.
        /// </summary>
        /// <param name="id">Initial value of the Id property.</param>
        /// <param name="companyUsingServiceId">Initial value of the CompanyUsingServiceId property.</param>
        /// <param name="gUID">Initial value of the GUID property.</param>
        /// <param name="documentType">Initial value of the DocumentType property.</param>
        /// <param name="uniqueIdentifier">Initial value of the UniqueIdentifier property.</param>
        /// <param name="ordinalNumber">Initial value of the OrdinalNumber property.</param>
        /// <param name="ordinalNumberInYear">Initial value of the OrdinalNumberInYear property.</param>
        /// <param name="documentDateTime">Initial value of the DocumentDateTime property.</param>
        /// <param name="creationDateTime">Initial value of the CreationDateTime property.</param>
        /// <param name="mDSubjects_Employee_AuthorId">Initial value of the MDSubjects_Employee_AuthorId property.</param>
        /// <param name="inactive">Initial value of the Inactive property.</param>
        /// <param name="lastActivityDate">Initial value of the LastActivityDate property.</param>
        /// <param name="mDSubjects_EmployeeWhoChengedId">Initial value of the MDSubjects_EmployeeWhoChengedId property.</param>
        /// <param name="lastChanged">Initial value of the LastChanged property.</param>
        public static Documents_Document_ForEntities CreateDocuments_Document_ForEntities(global::System.Int32 id, global::System.Int32 companyUsingServiceId, global::System.Guid gUID, global::System.Int16 documentType, global::System.String uniqueIdentifier, global::System.Int32 ordinalNumber, global::System.Int32 ordinalNumberInYear, global::System.DateTime documentDateTime, global::System.DateTime creationDateTime, global::System.Int32 mDSubjects_Employee_AuthorId, global::System.Boolean inactive, global::System.DateTime lastActivityDate, global::System.Int32 mDSubjects_EmployeeWhoChengedId, global::System.Byte[] lastChanged)
        {
            Documents_Document_ForEntities documents_Document_ForEntities = new Documents_Document_ForEntities();
            documents_Document_ForEntities.Id = id;
            documents_Document_ForEntities.CompanyUsingServiceId = companyUsingServiceId;
            documents_Document_ForEntities.GUID = gUID;
            documents_Document_ForEntities.DocumentType = documentType;
            documents_Document_ForEntities.UniqueIdentifier = uniqueIdentifier;
            documents_Document_ForEntities.OrdinalNumber = ordinalNumber;
            documents_Document_ForEntities.OrdinalNumberInYear = ordinalNumberInYear;
            documents_Document_ForEntities.DocumentDateTime = documentDateTime;
            documents_Document_ForEntities.CreationDateTime = creationDateTime;
            documents_Document_ForEntities.MDSubjects_Employee_AuthorId = mDSubjects_Employee_AuthorId;
            documents_Document_ForEntities.Inactive = inactive;
            documents_Document_ForEntities.LastActivityDate = lastActivityDate;
            documents_Document_ForEntities.MDSubjects_EmployeeWhoChengedId = mDSubjects_EmployeeWhoChengedId;
            documents_Document_ForEntities.LastChanged = lastChanged;
            return documents_Document_ForEntities;
        }

        #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 CompanyUsingServiceId
        {
            get
            {
                return _CompanyUsingServiceId;
            }
            set
            {
                OnCompanyUsingServiceIdChanging(value);
                ReportPropertyChanging("CompanyUsingServiceId");
                _CompanyUsingServiceId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("CompanyUsingServiceId");
                OnCompanyUsingServiceIdChanged();
            }
        }
        private global::System.Int32 _CompanyUsingServiceId;
        partial void OnCompanyUsingServiceIdChanging(global::System.Int32 value);
        partial void OnCompanyUsingServiceIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Guid GUID
        {
            get
            {
                return _GUID;
            }
            set
            {
                OnGUIDChanging(value);
                ReportPropertyChanging("GUID");
                _GUID = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("GUID");
                OnGUIDChanged();
            }
        }
        private global::System.Guid _GUID;
        partial void OnGUIDChanging(global::System.Guid value);
        partial void OnGUIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int16 DocumentType
        {
            get
            {
                return _DocumentType;
            }
            set
            {
                OnDocumentTypeChanging(value);
                ReportPropertyChanging("DocumentType");
                _DocumentType = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("DocumentType");
                OnDocumentTypeChanged();
            }
        }
        private global::System.Int16 _DocumentType;
        partial void OnDocumentTypeChanging(global::System.Int16 value);
        partial void OnDocumentTypeChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String UniqueIdentifier
        {
            get
            {
                return _UniqueIdentifier;
            }
            set
            {
                OnUniqueIdentifierChanging(value);
                ReportPropertyChanging("UniqueIdentifier");
                _UniqueIdentifier = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("UniqueIdentifier");
                OnUniqueIdentifierChanged();
            }
        }
        private global::System.String _UniqueIdentifier;
        partial void OnUniqueIdentifierChanging(global::System.String value);
        partial void OnUniqueIdentifierChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String Barcode
        {
            get
            {
                return _Barcode;
            }
            set
            {
                OnBarcodeChanging(value);
                ReportPropertyChanging("Barcode");
                _Barcode = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Barcode");
                OnBarcodeChanged();
            }
        }
        private global::System.String _Barcode;
        partial void OnBarcodeChanging(global::System.String value);
        partial void OnBarcodeChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 OrdinalNumber
        {
            get
            {
                return _OrdinalNumber;
            }
            set
            {
                OnOrdinalNumberChanging(value);
                ReportPropertyChanging("OrdinalNumber");
                _OrdinalNumber = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("OrdinalNumber");
                OnOrdinalNumberChanged();
            }
        }
        private global::System.Int32 _OrdinalNumber;
        partial void OnOrdinalNumberChanging(global::System.Int32 value);
        partial void OnOrdinalNumberChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 OrdinalNumberInYear
        {
            get
            {
                return _OrdinalNumberInYear;
            }
            set
            {
                OnOrdinalNumberInYearChanging(value);
                ReportPropertyChanging("OrdinalNumberInYear");
                _OrdinalNumberInYear = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("OrdinalNumberInYear");
                OnOrdinalNumberInYearChanged();
            }
        }
        private global::System.Int32 _OrdinalNumberInYear;
        partial void OnOrdinalNumberInYearChanging(global::System.Int32 value);
        partial void OnOrdinalNumberInYearChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.DateTime DocumentDateTime
        {
            get
            {
                return _DocumentDateTime;
            }
            set
            {
                OnDocumentDateTimeChanging(value);
                ReportPropertyChanging("DocumentDateTime");
                _DocumentDateTime = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("DocumentDateTime");
                OnDocumentDateTimeChanged();
            }
        }
        private global::System.DateTime _DocumentDateTime;
        partial void OnDocumentDateTimeChanging(global::System.DateTime value);
        partial void OnDocumentDateTimeChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.DateTime CreationDateTime
        {
            get
            {
                return _CreationDateTime;
            }
            set
            {
                OnCreationDateTimeChanging(value);
                ReportPropertyChanging("CreationDateTime");
                _CreationDateTime = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("CreationDateTime");
                OnCreationDateTimeChanged();
            }
        }
        private global::System.DateTime _CreationDateTime;
        partial void OnCreationDateTimeChanging(global::System.DateTime value);
        partial void OnCreationDateTimeChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 MDSubjects_Employee_AuthorId
        {
            get
            {
                return _MDSubjects_Employee_AuthorId;
            }
            set
            {
                OnMDSubjects_Employee_AuthorIdChanging(value);
                ReportPropertyChanging("MDSubjects_Employee_AuthorId");
                _MDSubjects_Employee_AuthorId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("MDSubjects_Employee_AuthorId");
                OnMDSubjects_Employee_AuthorIdChanged();
            }
        }
        private global::System.Int32 _MDSubjects_Employee_AuthorId;
        partial void OnMDSubjects_Employee_AuthorIdChanging(global::System.Int32 value);
        partial void OnMDSubjects_Employee_AuthorIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String Description
        {
            get
            {
                return _Description;
            }
            set
            {
                OnDescriptionChanging(value);
                ReportPropertyChanging("Description");
                _Description = StructuralObject.SetValidValue(value, true);
                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.Boolean Inactive
        {
            get
            {
                return _Inactive;
            }
            set
            {
                OnInactiveChanging(value);
                ReportPropertyChanging("Inactive");
                _Inactive = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Inactive");
                OnInactiveChanged();
            }
        }
        private global::System.Boolean _Inactive;
        partial void OnInactiveChanging(global::System.Boolean value);
        partial void OnInactiveChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.DateTime LastActivityDate
        {
            get
            {
                return _LastActivityDate;
            }
            set
            {
                OnLastActivityDateChanging(value);
                ReportPropertyChanging("LastActivityDate");
                _LastActivityDate = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("LastActivityDate");
                OnLastActivityDateChanged();
            }
        }
        private global::System.DateTime _LastActivityDate;
        partial void OnLastActivityDateChanging(global::System.DateTime value);
        partial void OnLastActivityDateChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 MDSubjects_EmployeeWhoChengedId
        {
            get
            {
                return _MDSubjects_EmployeeWhoChengedId;
            }
            set
            {
                OnMDSubjects_EmployeeWhoChengedIdChanging(value);
                ReportPropertyChanging("MDSubjects_EmployeeWhoChengedId");
                _MDSubjects_EmployeeWhoChengedId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("MDSubjects_EmployeeWhoChengedId");
                OnMDSubjects_EmployeeWhoChengedIdChanged();
            }
        }
        private global::System.Int32 _MDSubjects_EmployeeWhoChengedId;
        partial void OnMDSubjects_EmployeeWhoChengedIdChanging(global::System.Int32 value);
        partial void OnMDSubjects_EmployeeWhoChengedIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Byte[] LastChanged
        {
            get
            {
                return StructuralObject.GetValidValue(_LastChanged);
            }
            set
            {
                OnLastChangedChanging(value);
                ReportPropertyChanging("LastChanged");
                _LastChanged = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("LastChanged");
                OnLastChangedChanged();
            }
        }
        private global::System.Byte[] _LastChanged;
        partial void OnLastChangedChanging(global::System.Byte[] value);
        partial void OnLastChangedChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Boolean> Locked
        {
            get
            {
                return _Locked;
            }
            set
            {
                OnLockedChanging(value);
                ReportPropertyChanging("Locked");
                _Locked = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Locked");
                OnLockedChanged();
            }
        }
        private Nullable<global::System.Boolean> _Locked;
        partial void OnLockedChanging(Nullable<global::System.Boolean> value);
        partial void OnLockedChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int16> Status
        {
            get
            {
                return _Status;
            }
            set
            {
                OnStatusChanging(value);
                ReportPropertyChanging("Status");
                _Status = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Status");
                OnStatusChanged();
            }
        }
        private Nullable<global::System.Int16> _Status;
        partial void OnStatusChanging(Nullable<global::System.Int16> value);
        partial void OnStatusChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String CashBoxCode
        {
            get
            {
                return _CashBoxCode;
            }
            set
            {
                OnCashBoxCodeChanging(value);
                ReportPropertyChanging("CashBoxCode");
                _CashBoxCode = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("CashBoxCode");
                OnCashBoxCodeChanged();
            }
        }
        private global::System.String _CashBoxCode;
        partial void OnCashBoxCodeChanging(global::System.String value);
        partial void OnCashBoxCodeChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String LocationCode
        {
            get
            {
                return _LocationCode;
            }
            set
            {
                OnLocationCodeChanging(value);
                ReportPropertyChanging("LocationCode");
                _LocationCode = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("LocationCode");
                OnLocationCodeChanged();
            }
        }
        private global::System.String _LocationCode;
        partial void OnLocationCodeChanging(global::System.String value);
        partial void OnLocationCodeChanged();

        #endregion

    
    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="MDEntitiesModel", Name="Documents_PriceList_ForEntities")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class Documents_PriceList_ForEntities : Documents_Document_ForEntities
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new Documents_PriceList_ForEntities object.
        /// </summary>
        /// <param name="id">Initial value of the Id property.</param>
        /// <param name="companyUsingServiceId">Initial value of the CompanyUsingServiceId property.</param>
        /// <param name="gUID">Initial value of the GUID property.</param>
        /// <param name="documentType">Initial value of the DocumentType property.</param>
        /// <param name="uniqueIdentifier">Initial value of the UniqueIdentifier property.</param>
        /// <param name="ordinalNumber">Initial value of the OrdinalNumber property.</param>
        /// <param name="ordinalNumberInYear">Initial value of the OrdinalNumberInYear property.</param>
        /// <param name="documentDateTime">Initial value of the DocumentDateTime property.</param>
        /// <param name="creationDateTime">Initial value of the CreationDateTime property.</param>
        /// <param name="mDSubjects_Employee_AuthorId">Initial value of the MDSubjects_Employee_AuthorId property.</param>
        /// <param name="inactive">Initial value of the Inactive property.</param>
        /// <param name="lastActivityDate">Initial value of the LastActivityDate property.</param>
        /// <param name="mDSubjects_EmployeeWhoChengedId">Initial value of the MDSubjects_EmployeeWhoChengedId property.</param>
        /// <param name="lastChanged">Initial value of the LastChanged property.</param>
        /// <param name="isDefault">Initial value of the IsDefault property.</param>
        /// <param name="name">Initial value of the Name property.</param>
        /// <param name="dateStart">Initial value of the DateStart property.</param>
        public static Documents_PriceList_ForEntities CreateDocuments_PriceList_ForEntities(global::System.Int32 id, global::System.Int32 companyUsingServiceId, global::System.Guid gUID, global::System.Int16 documentType, global::System.String uniqueIdentifier, global::System.Int32 ordinalNumber, global::System.Int32 ordinalNumberInYear, global::System.DateTime documentDateTime, global::System.DateTime creationDateTime, global::System.Int32 mDSubjects_Employee_AuthorId, global::System.Boolean inactive, global::System.DateTime lastActivityDate, global::System.Int32 mDSubjects_EmployeeWhoChengedId, global::System.Byte[] lastChanged, global::System.Boolean isDefault, global::System.String name, global::System.DateTime dateStart)
        {
            Documents_PriceList_ForEntities documents_PriceList_ForEntities = new Documents_PriceList_ForEntities();
            documents_PriceList_ForEntities.Id = id;
            documents_PriceList_ForEntities.CompanyUsingServiceId = companyUsingServiceId;
            documents_PriceList_ForEntities.GUID = gUID;
            documents_PriceList_ForEntities.DocumentType = documentType;
            documents_PriceList_ForEntities.UniqueIdentifier = uniqueIdentifier;
            documents_PriceList_ForEntities.OrdinalNumber = ordinalNumber;
            documents_PriceList_ForEntities.OrdinalNumberInYear = ordinalNumberInYear;
            documents_PriceList_ForEntities.DocumentDateTime = documentDateTime;
            documents_PriceList_ForEntities.CreationDateTime = creationDateTime;
            documents_PriceList_ForEntities.MDSubjects_Employee_AuthorId = mDSubjects_Employee_AuthorId;
            documents_PriceList_ForEntities.Inactive = inactive;
            documents_PriceList_ForEntities.LastActivityDate = lastActivityDate;
            documents_PriceList_ForEntities.MDSubjects_EmployeeWhoChengedId = mDSubjects_EmployeeWhoChengedId;
            documents_PriceList_ForEntities.LastChanged = lastChanged;
            documents_PriceList_ForEntities.IsDefault = isDefault;
            documents_PriceList_ForEntities.Name = name;
            documents_PriceList_ForEntities.DateStart = dateStart;
            return documents_PriceList_ForEntities;
        }

        #endregion

        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Boolean IsDefault
        {
            get
            {
                return _IsDefault;
            }
            set
            {
                OnIsDefaultChanging(value);
                ReportPropertyChanging("IsDefault");
                _IsDefault = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("IsDefault");
                OnIsDefaultChanged();
            }
        }
        private global::System.Boolean _IsDefault;
        partial void OnIsDefaultChanging(global::System.Boolean value);
        partial void OnIsDefaultChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> MDSubjects_SubjectId
        {
            get
            {
                return _MDSubjects_SubjectId;
            }
            set
            {
                OnMDSubjects_SubjectIdChanging(value);
                ReportPropertyChanging("MDSubjects_SubjectId");
                _MDSubjects_SubjectId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("MDSubjects_SubjectId");
                OnMDSubjects_SubjectIdChanged();
            }
        }
        private Nullable<global::System.Int32> _MDSubjects_SubjectId;
        partial void OnMDSubjects_SubjectIdChanging(Nullable<global::System.Int32> value);
        partial void OnMDSubjects_SubjectIdChanged();
    
        /// <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.DateTime DateStart
        {
            get
            {
                return _DateStart;
            }
            set
            {
                OnDateStartChanging(value);
                ReportPropertyChanging("DateStart");
                _DateStart = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("DateStart");
                OnDateStartChanged();
            }
        }
        private global::System.DateTime _DateStart;
        partial void OnDateStartChanging(global::System.DateTime value);
        partial void OnDateStartChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.DateTime> DateEnd
        {
            get
            {
                return _DateEnd;
            }
            set
            {
                OnDateEndChanging(value);
                ReportPropertyChanging("DateEnd");
                _DateEnd = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("DateEnd");
                OnDateEndChanged();
            }
        }
        private Nullable<global::System.DateTime> _DateEnd;
        partial void OnDateEndChanging(Nullable<global::System.DateTime> value);
        partial void OnDateEndChanged();

        #endregion

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

        #endregion

    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="MDEntitiesModel", Name="Documents_PriceList_ItemsCol_ForEntities")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class Documents_PriceList_ItemsCol_ForEntities : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new Documents_PriceList_ItemsCol_ForEntities object.
        /// </summary>
        /// <param name="id">Initial value of the Id property.</param>
        /// <param name="documentId">Initial value of the DocumentId property.</param>
        /// <param name="ordinal">Initial value of the Ordinal property.</param>
        /// <param name="mDEntities_EntityId">Initial value of the MDEntities_EntityId property.</param>
        /// <param name="lastChanged">Initial value of the LastChanged property.</param>
        public static Documents_PriceList_ItemsCol_ForEntities CreateDocuments_PriceList_ItemsCol_ForEntities(global::System.Int32 id, global::System.Int32 documentId, global::System.Int32 ordinal, global::System.Int32 mDEntities_EntityId, global::System.Byte[] lastChanged)
        {
            Documents_PriceList_ItemsCol_ForEntities documents_PriceList_ItemsCol_ForEntities = new Documents_PriceList_ItemsCol_ForEntities();
            documents_PriceList_ItemsCol_ForEntities.Id = id;
            documents_PriceList_ItemsCol_ForEntities.DocumentId = documentId;
            documents_PriceList_ItemsCol_ForEntities.Ordinal = ordinal;
            documents_PriceList_ItemsCol_ForEntities.MDEntities_EntityId = mDEntities_EntityId;
            documents_PriceList_ItemsCol_ForEntities.LastChanged = lastChanged;
            return documents_PriceList_ItemsCol_ForEntities;
        }

        #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 DocumentId
        {
            get
            {
                return _DocumentId;
            }
            set
            {
                OnDocumentIdChanging(value);
                ReportPropertyChanging("DocumentId");
                _DocumentId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("DocumentId");
                OnDocumentIdChanged();
            }
        }
        private global::System.Int32 _DocumentId;
        partial void OnDocumentIdChanging(global::System.Int32 value);
        partial void OnDocumentIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 Ordinal
        {
            get
            {
                return _Ordinal;
            }
            set
            {
                OnOrdinalChanging(value);
                ReportPropertyChanging("Ordinal");
                _Ordinal = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Ordinal");
                OnOrdinalChanged();
            }
        }
        private global::System.Int32 _Ordinal;
        partial void OnOrdinalChanging(global::System.Int32 value);
        partial void OnOrdinalChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 MDEntities_EntityId
        {
            get
            {
                return _MDEntities_EntityId;
            }
            set
            {
                OnMDEntities_EntityIdChanging(value);
                ReportPropertyChanging("MDEntities_EntityId");
                _MDEntities_EntityId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("MDEntities_EntityId");
                OnMDEntities_EntityIdChanged();
            }
        }
        private global::System.Int32 _MDEntities_EntityId;
        partial void OnMDEntities_EntityIdChanging(global::System.Int32 value);
        partial void OnMDEntities_EntityIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Decimal> CalcualtedWholesalePrice
        {
            get
            {
                return _CalcualtedWholesalePrice;
            }
            set
            {
                OnCalcualtedWholesalePriceChanging(value);
                ReportPropertyChanging("CalcualtedWholesalePrice");
                _CalcualtedWholesalePrice = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("CalcualtedWholesalePrice");
                OnCalcualtedWholesalePriceChanged();
            }
        }
        private Nullable<global::System.Decimal> _CalcualtedWholesalePrice;
        partial void OnCalcualtedWholesalePriceChanging(Nullable<global::System.Decimal> value);
        partial void OnCalcualtedWholesalePriceChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Decimal> WholesalePrice
        {
            get
            {
                return _WholesalePrice;
            }
            set
            {
                OnWholesalePriceChanging(value);
                ReportPropertyChanging("WholesalePrice");
                _WholesalePrice = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("WholesalePrice");
                OnWholesalePriceChanged();
            }
        }
        private Nullable<global::System.Decimal> _WholesalePrice;
        partial void OnWholesalePriceChanging(Nullable<global::System.Decimal> value);
        partial void OnWholesalePriceChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Decimal> WholesalePriceOption1
        {
            get
            {
                return _WholesalePriceOption1;
            }
            set
            {
                OnWholesalePriceOption1Changing(value);
                ReportPropertyChanging("WholesalePriceOption1");
                _WholesalePriceOption1 = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("WholesalePriceOption1");
                OnWholesalePriceOption1Changed();
            }
        }
        private Nullable<global::System.Decimal> _WholesalePriceOption1;
        partial void OnWholesalePriceOption1Changing(Nullable<global::System.Decimal> value);
        partial void OnWholesalePriceOption1Changed();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Byte[] LastChanged
        {
            get
            {
                return StructuralObject.GetValidValue(_LastChanged);
            }
            set
            {
                OnLastChangedChanging(value);
                ReportPropertyChanging("LastChanged");
                _LastChanged = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("LastChanged");
                OnLastChangedChanged();
            }
        }
        private global::System.Byte[] _LastChanged;
        partial void OnLastChangedChanging(global::System.Byte[] value);
        partial void OnLastChangedChanged();

        #endregion

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

        #endregion

    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="MDEntitiesModel", Name="MDEntities_Entity")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    [KnownTypeAttribute(typeof(MDEntities_Product))]
    [KnownTypeAttribute(typeof(MDEntities_Service))]
    public partial class MDEntities_Entity : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new MDEntities_Entity object.
        /// </summary>
        /// <param name="id">Initial value of the Id property.</param>
        /// <param name="companyUsingServiceId">Initial value of the CompanyUsingServiceId property.</param>
        /// <param name="gUID">Initial value of the GUID property.</param>
        /// <param name="label">Initial value of the Label property.</param>
        /// <param name="name">Initial value of the Name property.</param>
        /// <param name="inactive">Initial value of the Inactive property.</param>
        /// <param name="lastActivityDate">Initial value of the LastActivityDate property.</param>
        /// <param name="lastChanged">Initial value of the LastChanged property.</param>
        /// <param name="employeeWhoLastChanedItUserId">Initial value of the EmployeeWhoLastChanedItUserId property.</param>
        /// <param name="taxRateId">Initial value of the TaxRateId property.</param>
        /// <param name="entityType">Initial value of the EntityType property.</param>
        /// <param name="unitId">Initial value of the UnitId property.</param>
        public static MDEntities_Entity CreateMDEntities_Entity(global::System.Int32 id, global::System.Int32 companyUsingServiceId, global::System.Guid gUID, global::System.String label, global::System.String name, global::System.Boolean inactive, global::System.DateTime lastActivityDate, global::System.Byte[] lastChanged, global::System.Int32 employeeWhoLastChanedItUserId, global::System.Int32 taxRateId, global::System.Int16 entityType, global::System.Int32 unitId)
        {
            MDEntities_Entity mDEntities_Entity = new MDEntities_Entity();
            mDEntities_Entity.Id = id;
            mDEntities_Entity.CompanyUsingServiceId = companyUsingServiceId;
            mDEntities_Entity.GUID = gUID;
            mDEntities_Entity.Label = label;
            mDEntities_Entity.Name = name;
            mDEntities_Entity.Inactive = inactive;
            mDEntities_Entity.LastActivityDate = lastActivityDate;
            mDEntities_Entity.LastChanged = lastChanged;
            mDEntities_Entity.EmployeeWhoLastChanedItUserId = employeeWhoLastChanedItUserId;
            mDEntities_Entity.TaxRateId = taxRateId;
            mDEntities_Entity.EntityType = entityType;
            mDEntities_Entity.UnitId = unitId;
            return mDEntities_Entity;
        }

        #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 CompanyUsingServiceId
        {
            get
            {
                return _CompanyUsingServiceId;
            }
            set
            {
                OnCompanyUsingServiceIdChanging(value);
                ReportPropertyChanging("CompanyUsingServiceId");
                _CompanyUsingServiceId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("CompanyUsingServiceId");
                OnCompanyUsingServiceIdChanged();
            }
        }
        private global::System.Int32 _CompanyUsingServiceId;
        partial void OnCompanyUsingServiceIdChanging(global::System.Int32 value);
        partial void OnCompanyUsingServiceIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Guid GUID
        {
            get
            {
                return _GUID;
            }
            set
            {
                OnGUIDChanging(value);
                ReportPropertyChanging("GUID");
                _GUID = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("GUID");
                OnGUIDChanged();
            }
        }
        private global::System.Guid _GUID;
        partial void OnGUIDChanging(global::System.Guid value);
        partial void OnGUIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String Label
        {
            get
            {
                return _Label;
            }
            set
            {
                OnLabelChanging(value);
                ReportPropertyChanging("Label");
                _Label = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Label");
                OnLabelChanged();
            }
        }
        private global::System.String _Label;
        partial void OnLabelChanging(global::System.String value);
        partial void OnLabelChanged();
    
        /// <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=true)]
        [DataMemberAttribute()]
        public global::System.String Tag
        {
            get
            {
                return _Tag;
            }
            set
            {
                OnTagChanging(value);
                ReportPropertyChanging("Tag");
                _Tag = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Tag");
                OnTagChanged();
            }
        }
        private global::System.String _Tag;
        partial void OnTagChanging(global::System.String value);
        partial void OnTagChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Boolean Inactive
        {
            get
            {
                return _Inactive;
            }
            set
            {
                OnInactiveChanging(value);
                ReportPropertyChanging("Inactive");
                _Inactive = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Inactive");
                OnInactiveChanged();
            }
        }
        private global::System.Boolean _Inactive;
        partial void OnInactiveChanging(global::System.Boolean value);
        partial void OnInactiveChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.DateTime LastActivityDate
        {
            get
            {
                return _LastActivityDate;
            }
            set
            {
                OnLastActivityDateChanging(value);
                ReportPropertyChanging("LastActivityDate");
                _LastActivityDate = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("LastActivityDate");
                OnLastActivityDateChanged();
            }
        }
        private global::System.DateTime _LastActivityDate;
        partial void OnLastActivityDateChanging(global::System.DateTime value);
        partial void OnLastActivityDateChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Byte[] LastChanged
        {
            get
            {
                return StructuralObject.GetValidValue(_LastChanged);
            }
            set
            {
                OnLastChangedChanging(value);
                ReportPropertyChanging("LastChanged");
                _LastChanged = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("LastChanged");
                OnLastChangedChanged();
            }
        }
        private global::System.Byte[] _LastChanged;
        partial void OnLastChangedChanging(global::System.Byte[] value);
        partial void OnLastChangedChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> MDEntities_Enums_EntityGroupId
        {
            get
            {
                return _MDEntities_Enums_EntityGroupId;
            }
            set
            {
                OnMDEntities_Enums_EntityGroupIdChanging(value);
                ReportPropertyChanging("MDEntities_Enums_EntityGroupId");
                _MDEntities_Enums_EntityGroupId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("MDEntities_Enums_EntityGroupId");
                OnMDEntities_Enums_EntityGroupIdChanged();
            }
        }
        private Nullable<global::System.Int32> _MDEntities_Enums_EntityGroupId;
        partial void OnMDEntities_Enums_EntityGroupIdChanging(Nullable<global::System.Int32> value);
        partial void OnMDEntities_Enums_EntityGroupIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String Description
        {
            get
            {
                return _Description;
            }
            set
            {
                OnDescriptionChanging(value);
                ReportPropertyChanging("Description");
                _Description = StructuralObject.SetValidValue(value, true);
                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.Int32 EmployeeWhoLastChanedItUserId
        {
            get
            {
                return _EmployeeWhoLastChanedItUserId;
            }
            set
            {
                OnEmployeeWhoLastChanedItUserIdChanging(value);
                ReportPropertyChanging("EmployeeWhoLastChanedItUserId");
                _EmployeeWhoLastChanedItUserId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("EmployeeWhoLastChanedItUserId");
                OnEmployeeWhoLastChanedItUserIdChanged();
            }
        }
        private global::System.Int32 _EmployeeWhoLastChanedItUserId;
        partial void OnEmployeeWhoLastChanedItUserIdChanging(global::System.Int32 value);
        partial void OnEmployeeWhoLastChanedItUserIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 TaxRateId
        {
            get
            {
                return _TaxRateId;
            }
            set
            {
                OnTaxRateIdChanging(value);
                ReportPropertyChanging("TaxRateId");
                _TaxRateId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("TaxRateId");
                OnTaxRateIdChanged();
            }
        }
        private global::System.Int32 _TaxRateId;
        partial void OnTaxRateIdChanging(global::System.Int32 value);
        partial void OnTaxRateIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int16 EntityType
        {
            get
            {
                return _EntityType;
            }
            set
            {
                OnEntityTypeChanging(value);
                ReportPropertyChanging("EntityType");
                _EntityType = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("EntityType");
                OnEntityTypeChanged();
            }
        }
        private global::System.Int16 _EntityType;
        partial void OnEntityTypeChanging(global::System.Int16 value);
        partial void OnEntityTypeChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 UnitId
        {
            get
            {
                return _UnitId;
            }
            set
            {
                OnUnitIdChanging(value);
                ReportPropertyChanging("UnitId");
                _UnitId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("UnitId");
                OnUnitIdChanged();
            }
        }
        private global::System.Int32 _UnitId;
        partial void OnUnitIdChanging(global::System.Int32 value);
        partial void OnUnitIdChanged();

        #endregion

    
    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="MDEntitiesModel", Name="MDEntities_Enums_EntityGroup")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class MDEntities_Enums_EntityGroup : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new MDEntities_Enums_EntityGroup object.
        /// </summary>
        /// <param name="id">Initial value of the Id property.</param>
        /// <param name="companyUsingServiceId">Initial value of the CompanyUsingServiceId property.</param>
        /// <param name="label">Initial value of the Label property.</param>
        /// <param name="name">Initial value of the Name property.</param>
        /// <param name="inactive">Initial value of the Inactive property.</param>
        /// <param name="lastActivityDate">Initial value of the LastActivityDate property.</param>
        /// <param name="lastChanged">Initial value of the LastChanged property.</param>
        /// <param name="employeeWhoLastChanedItUserId">Initial value of the EmployeeWhoLastChanedItUserId property.</param>
        public static MDEntities_Enums_EntityGroup CreateMDEntities_Enums_EntityGroup(global::System.Int32 id, global::System.Int32 companyUsingServiceId, global::System.String label, global::System.String name, global::System.Boolean inactive, global::System.DateTime lastActivityDate, global::System.Byte[] lastChanged, global::System.Int32 employeeWhoLastChanedItUserId)
        {
            MDEntities_Enums_EntityGroup mDEntities_Enums_EntityGroup = new MDEntities_Enums_EntityGroup();
            mDEntities_Enums_EntityGroup.Id = id;
            mDEntities_Enums_EntityGroup.CompanyUsingServiceId = companyUsingServiceId;
            mDEntities_Enums_EntityGroup.Label = label;
            mDEntities_Enums_EntityGroup.Name = name;
            mDEntities_Enums_EntityGroup.Inactive = inactive;
            mDEntities_Enums_EntityGroup.LastActivityDate = lastActivityDate;
            mDEntities_Enums_EntityGroup.LastChanged = lastChanged;
            mDEntities_Enums_EntityGroup.EmployeeWhoLastChanedItUserId = employeeWhoLastChanedItUserId;
            return mDEntities_Enums_EntityGroup;
        }

        #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 CompanyUsingServiceId
        {
            get
            {
                return _CompanyUsingServiceId;
            }
            set
            {
                OnCompanyUsingServiceIdChanging(value);
                ReportPropertyChanging("CompanyUsingServiceId");
                _CompanyUsingServiceId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("CompanyUsingServiceId");
                OnCompanyUsingServiceIdChanged();
            }
        }
        private global::System.Int32 _CompanyUsingServiceId;
        partial void OnCompanyUsingServiceIdChanging(global::System.Int32 value);
        partial void OnCompanyUsingServiceIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String Label
        {
            get
            {
                return _Label;
            }
            set
            {
                OnLabelChanging(value);
                ReportPropertyChanging("Label");
                _Label = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Label");
                OnLabelChanged();
            }
        }
        private global::System.String _Label;
        partial void OnLabelChanging(global::System.String value);
        partial void OnLabelChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String Name
        {
            get
            {
                return _Name;
            }
            set
            {
                OnNameChanging(value);
                ReportPropertyChanging("Name");
                _Name = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Name");
                OnNameChanged();
            }
        }
        private global::System.String _Name;
        partial void OnNameChanging(global::System.String value);
        partial void OnNameChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Boolean Inactive
        {
            get
            {
                return _Inactive;
            }
            set
            {
                OnInactiveChanging(value);
                ReportPropertyChanging("Inactive");
                _Inactive = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Inactive");
                OnInactiveChanged();
            }
        }
        private global::System.Boolean _Inactive;
        partial void OnInactiveChanging(global::System.Boolean value);
        partial void OnInactiveChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.DateTime LastActivityDate
        {
            get
            {
                return _LastActivityDate;
            }
            set
            {
                OnLastActivityDateChanging(value);
                ReportPropertyChanging("LastActivityDate");
                _LastActivityDate = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("LastActivityDate");
                OnLastActivityDateChanged();
            }
        }
        private global::System.DateTime _LastActivityDate;
        partial void OnLastActivityDateChanging(global::System.DateTime value);
        partial void OnLastActivityDateChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Byte[] LastChanged
        {
            get
            {
                return StructuralObject.GetValidValue(_LastChanged);
            }
            set
            {
                OnLastChangedChanging(value);
                ReportPropertyChanging("LastChanged");
                _LastChanged = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("LastChanged");
                OnLastChangedChanged();
            }
        }
        private global::System.Byte[] _LastChanged;
        partial void OnLastChangedChanging(global::System.Byte[] value);
        partial void OnLastChangedChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> MDEntities_Enums_EntityParentGroupId
        {
            get
            {
                return _MDEntities_Enums_EntityParentGroupId;
            }
            set
            {
                OnMDEntities_Enums_EntityParentGroupIdChanging(value);
                ReportPropertyChanging("MDEntities_Enums_EntityParentGroupId");
                _MDEntities_Enums_EntityParentGroupId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("MDEntities_Enums_EntityParentGroupId");
                OnMDEntities_Enums_EntityParentGroupIdChanged();
            }
        }
        private Nullable<global::System.Int32> _MDEntities_Enums_EntityParentGroupId;
        partial void OnMDEntities_Enums_EntityParentGroupIdChanging(Nullable<global::System.Int32> value);
        partial void OnMDEntities_Enums_EntityParentGroupIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 EmployeeWhoLastChanedItUserId
        {
            get
            {
                return _EmployeeWhoLastChanedItUserId;
            }
            set
            {
                OnEmployeeWhoLastChanedItUserIdChanging(value);
                ReportPropertyChanging("EmployeeWhoLastChanedItUserId");
                _EmployeeWhoLastChanedItUserId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("EmployeeWhoLastChanedItUserId");
                OnEmployeeWhoLastChanedItUserIdChanged();
            }
        }
        private global::System.Int32 _EmployeeWhoLastChanedItUserId;
        partial void OnEmployeeWhoLastChanedItUserIdChanging(global::System.Int32 value);
        partial void OnEmployeeWhoLastChanedItUserIdChanged();

        #endregion

    
    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="MDEntitiesModel", Name="MDEntities_Enums_TaxRate")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class MDEntities_Enums_TaxRate : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new MDEntities_Enums_TaxRate object.
        /// </summary>
        /// <param name="id">Initial value of the Id property.</param>
        /// <param name="name">Initial value of the Name property.</param>
        /// <param name="percentage">Initial value of the Percentage property.</param>
        /// <param name="inactive">Initial value of the Inactive property.</param>
        /// <param name="lastActivityDate">Initial value of the LastActivityDate property.</param>
        /// <param name="employeeWhoLastChanedItUserId">Initial value of the EmployeeWhoLastChanedItUserId property.</param>
        /// <param name="lastChanged">Initial value of the LastChanged property.</param>
        /// <param name="isService">Initial value of the IsService property.</param>
        public static MDEntities_Enums_TaxRate CreateMDEntities_Enums_TaxRate(global::System.Int32 id, global::System.String name, global::System.Decimal percentage, global::System.Boolean inactive, global::System.DateTime lastActivityDate, global::System.Int32 employeeWhoLastChanedItUserId, global::System.Byte[] lastChanged, global::System.Boolean isService)
        {
            MDEntities_Enums_TaxRate mDEntities_Enums_TaxRate = new MDEntities_Enums_TaxRate();
            mDEntities_Enums_TaxRate.Id = id;
            mDEntities_Enums_TaxRate.Name = name;
            mDEntities_Enums_TaxRate.Percentage = percentage;
            mDEntities_Enums_TaxRate.Inactive = inactive;
            mDEntities_Enums_TaxRate.LastActivityDate = lastActivityDate;
            mDEntities_Enums_TaxRate.EmployeeWhoLastChanedItUserId = employeeWhoLastChanedItUserId;
            mDEntities_Enums_TaxRate.LastChanged = lastChanged;
            mDEntities_Enums_TaxRate.IsService = isService;
            return mDEntities_Enums_TaxRate;
        }

        #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();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Decimal Percentage
        {
            get
            {
                return _Percentage;
            }
            set
            {
                OnPercentageChanging(value);
                ReportPropertyChanging("Percentage");
                _Percentage = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Percentage");
                OnPercentageChanged();
            }
        }
        private global::System.Decimal _Percentage;
        partial void OnPercentageChanging(global::System.Decimal value);
        partial void OnPercentageChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String Description
        {
            get
            {
                return _Description;
            }
            set
            {
                OnDescriptionChanging(value);
                ReportPropertyChanging("Description");
                _Description = StructuralObject.SetValidValue(value, true);
                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.Boolean Inactive
        {
            get
            {
                return _Inactive;
            }
            set
            {
                OnInactiveChanging(value);
                ReportPropertyChanging("Inactive");
                _Inactive = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Inactive");
                OnInactiveChanged();
            }
        }
        private global::System.Boolean _Inactive;
        partial void OnInactiveChanging(global::System.Boolean value);
        partial void OnInactiveChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.DateTime LastActivityDate
        {
            get
            {
                return _LastActivityDate;
            }
            set
            {
                OnLastActivityDateChanging(value);
                ReportPropertyChanging("LastActivityDate");
                _LastActivityDate = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("LastActivityDate");
                OnLastActivityDateChanged();
            }
        }
        private global::System.DateTime _LastActivityDate;
        partial void OnLastActivityDateChanging(global::System.DateTime value);
        partial void OnLastActivityDateChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 EmployeeWhoLastChanedItUserId
        {
            get
            {
                return _EmployeeWhoLastChanedItUserId;
            }
            set
            {
                OnEmployeeWhoLastChanedItUserIdChanging(value);
                ReportPropertyChanging("EmployeeWhoLastChanedItUserId");
                _EmployeeWhoLastChanedItUserId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("EmployeeWhoLastChanedItUserId");
                OnEmployeeWhoLastChanedItUserIdChanged();
            }
        }
        private global::System.Int32 _EmployeeWhoLastChanedItUserId;
        partial void OnEmployeeWhoLastChanedItUserIdChanging(global::System.Int32 value);
        partial void OnEmployeeWhoLastChanedItUserIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Byte[] LastChanged
        {
            get
            {
                return StructuralObject.GetValidValue(_LastChanged);
            }
            set
            {
                OnLastChangedChanging(value);
                ReportPropertyChanging("LastChanged");
                _LastChanged = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("LastChanged");
                OnLastChangedChanged();
            }
        }
        private global::System.Byte[] _LastChanged;
        partial void OnLastChangedChanging(global::System.Byte[] value);
        partial void OnLastChangedChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> CompanyUsingServiceId
        {
            get
            {
                return _CompanyUsingServiceId;
            }
            set
            {
                OnCompanyUsingServiceIdChanging(value);
                ReportPropertyChanging("CompanyUsingServiceId");
                _CompanyUsingServiceId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("CompanyUsingServiceId");
                OnCompanyUsingServiceIdChanged();
            }
        }
        private Nullable<global::System.Int32> _CompanyUsingServiceId;
        partial void OnCompanyUsingServiceIdChanging(Nullable<global::System.Int32> value);
        partial void OnCompanyUsingServiceIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Boolean IsService
        {
            get
            {
                return _IsService;
            }
            set
            {
                OnIsServiceChanging(value);
                ReportPropertyChanging("IsService");
                _IsService = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("IsService");
                OnIsServiceChanged();
            }
        }
        private global::System.Boolean _IsService;
        partial void OnIsServiceChanging(global::System.Boolean value);
        partial void OnIsServiceChanged();

        #endregion

    
    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="MDEntitiesModel", Name="MDEntities_Enums_Unit")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class MDEntities_Enums_Unit : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new MDEntities_Enums_Unit object.
        /// </summary>
        /// <param name="id">Initial value of the Id property.</param>
        /// <param name="name">Initial value of the Name property.</param>
        /// <param name="label">Initial value of the Label property.</param>
        /// <param name="lastChanged">Initial value of the LastChanged property.</param>
        /// <param name="lastActivityDate">Initial value of the LastActivityDate property.</param>
        /// <param name="employeeWhoLastChanedItUserId">Initial value of the EmployeeWhoLastChanedItUserId property.</param>
        /// <param name="inactive">Initial value of the Inactive property.</param>
        public static MDEntities_Enums_Unit CreateMDEntities_Enums_Unit(global::System.Int32 id, global::System.String name, global::System.String label, global::System.Byte[] lastChanged, global::System.DateTime lastActivityDate, global::System.Int32 employeeWhoLastChanedItUserId, global::System.Boolean inactive)
        {
            MDEntities_Enums_Unit mDEntities_Enums_Unit = new MDEntities_Enums_Unit();
            mDEntities_Enums_Unit.Id = id;
            mDEntities_Enums_Unit.Name = name;
            mDEntities_Enums_Unit.Label = label;
            mDEntities_Enums_Unit.LastChanged = lastChanged;
            mDEntities_Enums_Unit.LastActivityDate = lastActivityDate;
            mDEntities_Enums_Unit.EmployeeWhoLastChanedItUserId = employeeWhoLastChanedItUserId;
            mDEntities_Enums_Unit.Inactive = inactive;
            return mDEntities_Enums_Unit;
        }

        #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();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String Label
        {
            get
            {
                return _Label;
            }
            set
            {
                OnLabelChanging(value);
                ReportPropertyChanging("Label");
                _Label = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Label");
                OnLabelChanged();
            }
        }
        private global::System.String _Label;
        partial void OnLabelChanging(global::System.String value);
        partial void OnLabelChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Byte[] LastChanged
        {
            get
            {
                return StructuralObject.GetValidValue(_LastChanged);
            }
            set
            {
                OnLastChangedChanging(value);
                ReportPropertyChanging("LastChanged");
                _LastChanged = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("LastChanged");
                OnLastChangedChanged();
            }
        }
        private global::System.Byte[] _LastChanged;
        partial void OnLastChangedChanging(global::System.Byte[] value);
        partial void OnLastChangedChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.DateTime LastActivityDate
        {
            get
            {
                return _LastActivityDate;
            }
            set
            {
                OnLastActivityDateChanging(value);
                ReportPropertyChanging("LastActivityDate");
                _LastActivityDate = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("LastActivityDate");
                OnLastActivityDateChanged();
            }
        }
        private global::System.DateTime _LastActivityDate;
        partial void OnLastActivityDateChanging(global::System.DateTime value);
        partial void OnLastActivityDateChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 EmployeeWhoLastChanedItUserId
        {
            get
            {
                return _EmployeeWhoLastChanedItUserId;
            }
            set
            {
                OnEmployeeWhoLastChanedItUserIdChanging(value);
                ReportPropertyChanging("EmployeeWhoLastChanedItUserId");
                _EmployeeWhoLastChanedItUserId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("EmployeeWhoLastChanedItUserId");
                OnEmployeeWhoLastChanedItUserIdChanged();
            }
        }
        private global::System.Int32 _EmployeeWhoLastChanedItUserId;
        partial void OnEmployeeWhoLastChanedItUserIdChanging(global::System.Int32 value);
        partial void OnEmployeeWhoLastChanedItUserIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> CompanyUsingServiceId
        {
            get
            {
                return _CompanyUsingServiceId;
            }
            set
            {
                OnCompanyUsingServiceIdChanging(value);
                ReportPropertyChanging("CompanyUsingServiceId");
                _CompanyUsingServiceId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("CompanyUsingServiceId");
                OnCompanyUsingServiceIdChanged();
            }
        }
        private Nullable<global::System.Int32> _CompanyUsingServiceId;
        partial void OnCompanyUsingServiceIdChanging(Nullable<global::System.Int32> value);
        partial void OnCompanyUsingServiceIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Boolean Inactive
        {
            get
            {
                return _Inactive;
            }
            set
            {
                OnInactiveChanging(value);
                ReportPropertyChanging("Inactive");
                _Inactive = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Inactive");
                OnInactiveChanged();
            }
        }
        private global::System.Boolean _Inactive;
        partial void OnInactiveChanging(global::System.Boolean value);
        partial void OnInactiveChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Boolean> IsDefaultTimeTracking
        {
            get
            {
                return _IsDefaultTimeTracking;
            }
            set
            {
                OnIsDefaultTimeTrackingChanging(value);
                ReportPropertyChanging("IsDefaultTimeTracking");
                _IsDefaultTimeTracking = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("IsDefaultTimeTracking");
                OnIsDefaultTimeTrackingChanged();
            }
        }
        private Nullable<global::System.Boolean> _IsDefaultTimeTracking;
        partial void OnIsDefaultTimeTrackingChanging(Nullable<global::System.Boolean> value);
        partial void OnIsDefaultTimeTrackingChanged();

        #endregion

    
    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="MDEntitiesModel", Name="MDEntities_Product")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class MDEntities_Product : MDEntities_Entity
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new MDEntities_Product object.
        /// </summary>
        /// <param name="id">Initial value of the Id property.</param>
        /// <param name="companyUsingServiceId">Initial value of the CompanyUsingServiceId property.</param>
        /// <param name="gUID">Initial value of the GUID property.</param>
        /// <param name="label">Initial value of the Label property.</param>
        /// <param name="name">Initial value of the Name property.</param>
        /// <param name="inactive">Initial value of the Inactive property.</param>
        /// <param name="lastActivityDate">Initial value of the LastActivityDate property.</param>
        /// <param name="lastChanged">Initial value of the LastChanged property.</param>
        /// <param name="employeeWhoLastChanedItUserId">Initial value of the EmployeeWhoLastChanedItUserId property.</param>
        /// <param name="taxRateId">Initial value of the TaxRateId property.</param>
        /// <param name="entityType">Initial value of the EntityType property.</param>
        /// <param name="unitId">Initial value of the UnitId property.</param>
        /// <param name="wholesalePrice">Initial value of the WholesalePrice property.</param>
        public static MDEntities_Product CreateMDEntities_Product(global::System.Int32 id, global::System.Int32 companyUsingServiceId, global::System.Guid gUID, global::System.String label, global::System.String name, global::System.Boolean inactive, global::System.DateTime lastActivityDate, global::System.Byte[] lastChanged, global::System.Int32 employeeWhoLastChanedItUserId, global::System.Int32 taxRateId, global::System.Int16 entityType, global::System.Int32 unitId, global::System.Decimal wholesalePrice)
        {
            MDEntities_Product mDEntities_Product = new MDEntities_Product();
            mDEntities_Product.Id = id;
            mDEntities_Product.CompanyUsingServiceId = companyUsingServiceId;
            mDEntities_Product.GUID = gUID;
            mDEntities_Product.Label = label;
            mDEntities_Product.Name = name;
            mDEntities_Product.Inactive = inactive;
            mDEntities_Product.LastActivityDate = lastActivityDate;
            mDEntities_Product.LastChanged = lastChanged;
            mDEntities_Product.EmployeeWhoLastChanedItUserId = employeeWhoLastChanedItUserId;
            mDEntities_Product.TaxRateId = taxRateId;
            mDEntities_Product.EntityType = entityType;
            mDEntities_Product.UnitId = unitId;
            mDEntities_Product.WholesalePrice = wholesalePrice;
            return mDEntities_Product;
        }

        #endregion

        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String Barcode
        {
            get
            {
                return _Barcode;
            }
            set
            {
                OnBarcodeChanging(value);
                ReportPropertyChanging("Barcode");
                _Barcode = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Barcode");
                OnBarcodeChanged();
            }
        }
        private global::System.String _Barcode;
        partial void OnBarcodeChanging(global::System.String value);
        partial void OnBarcodeChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Decimal WholesalePrice
        {
            get
            {
                return _WholesalePrice;
            }
            set
            {
                OnWholesalePriceChanging(value);
                ReportPropertyChanging("WholesalePrice");
                _WholesalePrice = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("WholesalePrice");
                OnWholesalePriceChanged();
            }
        }
        private global::System.Decimal _WholesalePrice;
        partial void OnWholesalePriceChanging(global::System.Decimal value);
        partial void OnWholesalePriceChanged();

        #endregion

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

        #endregion

    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="MDEntitiesModel", Name="MDEntities_Product_PicturesCol")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class MDEntities_Product_PicturesCol : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new MDEntities_Product_PicturesCol object.
        /// </summary>
        /// <param name="id">Initial value of the Id property.</param>
        /// <param name="productId">Initial value of the ProductId property.</param>
        /// <param name="picture">Initial value of the Picture property.</param>
        /// <param name="lastChanged">Initial value of the LastChanged property.</param>
        public static MDEntities_Product_PicturesCol CreateMDEntities_Product_PicturesCol(global::System.Int32 id, global::System.Int32 productId, global::System.Byte[] picture, global::System.Byte[] lastChanged)
        {
            MDEntities_Product_PicturesCol mDEntities_Product_PicturesCol = new MDEntities_Product_PicturesCol();
            mDEntities_Product_PicturesCol.Id = id;
            mDEntities_Product_PicturesCol.ProductId = productId;
            mDEntities_Product_PicturesCol.Picture = picture;
            mDEntities_Product_PicturesCol.LastChanged = lastChanged;
            return mDEntities_Product_PicturesCol;
        }

        #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 ProductId
        {
            get
            {
                return _ProductId;
            }
            set
            {
                OnProductIdChanging(value);
                ReportPropertyChanging("ProductId");
                _ProductId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("ProductId");
                OnProductIdChanged();
            }
        }
        private global::System.Int32 _ProductId;
        partial void OnProductIdChanging(global::System.Int32 value);
        partial void OnProductIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Byte[] Picture
        {
            get
            {
                return StructuralObject.GetValidValue(_Picture);
            }
            set
            {
                OnPictureChanging(value);
                ReportPropertyChanging("Picture");
                _Picture = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Picture");
                OnPictureChanged();
            }
        }
        private global::System.Byte[] _Picture;
        partial void OnPictureChanging(global::System.Byte[] value);
        partial void OnPictureChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Byte[] LastChanged
        {
            get
            {
                return StructuralObject.GetValidValue(_LastChanged);
            }
            set
            {
                OnLastChangedChanging(value);
                ReportPropertyChanging("LastChanged");
                _LastChanged = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("LastChanged");
                OnLastChangedChanged();
            }
        }
        private global::System.Byte[] _LastChanged;
        partial void OnLastChangedChanging(global::System.Byte[] value);
        partial void OnLastChangedChanged();

        #endregion

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

        #endregion

    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="MDEntitiesModel", Name="MDEntities_Service")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class MDEntities_Service : MDEntities_Entity
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new MDEntities_Service object.
        /// </summary>
        /// <param name="id">Initial value of the Id property.</param>
        /// <param name="companyUsingServiceId">Initial value of the CompanyUsingServiceId property.</param>
        /// <param name="gUID">Initial value of the GUID property.</param>
        /// <param name="label">Initial value of the Label property.</param>
        /// <param name="name">Initial value of the Name property.</param>
        /// <param name="inactive">Initial value of the Inactive property.</param>
        /// <param name="lastActivityDate">Initial value of the LastActivityDate property.</param>
        /// <param name="lastChanged">Initial value of the LastChanged property.</param>
        /// <param name="employeeWhoLastChanedItUserId">Initial value of the EmployeeWhoLastChanedItUserId property.</param>
        /// <param name="taxRateId">Initial value of the TaxRateId property.</param>
        /// <param name="entityType">Initial value of the EntityType property.</param>
        /// <param name="unitId">Initial value of the UnitId property.</param>
        /// <param name="wholesalePrice">Initial value of the WholesalePrice property.</param>
        public static MDEntities_Service CreateMDEntities_Service(global::System.Int32 id, global::System.Int32 companyUsingServiceId, global::System.Guid gUID, global::System.String label, global::System.String name, global::System.Boolean inactive, global::System.DateTime lastActivityDate, global::System.Byte[] lastChanged, global::System.Int32 employeeWhoLastChanedItUserId, global::System.Int32 taxRateId, global::System.Int16 entityType, global::System.Int32 unitId, global::System.Decimal wholesalePrice)
        {
            MDEntities_Service mDEntities_Service = new MDEntities_Service();
            mDEntities_Service.Id = id;
            mDEntities_Service.CompanyUsingServiceId = companyUsingServiceId;
            mDEntities_Service.GUID = gUID;
            mDEntities_Service.Label = label;
            mDEntities_Service.Name = name;
            mDEntities_Service.Inactive = inactive;
            mDEntities_Service.LastActivityDate = lastActivityDate;
            mDEntities_Service.LastChanged = lastChanged;
            mDEntities_Service.EmployeeWhoLastChanedItUserId = employeeWhoLastChanedItUserId;
            mDEntities_Service.TaxRateId = taxRateId;
            mDEntities_Service.EntityType = entityType;
            mDEntities_Service.UnitId = unitId;
            mDEntities_Service.WholesalePrice = wholesalePrice;
            return mDEntities_Service;
        }

        #endregion

        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Decimal> WholesaleTaskRatePerMonth
        {
            get
            {
                return _WholesaleTaskRatePerMonth;
            }
            set
            {
                OnWholesaleTaskRatePerMonthChanging(value);
                ReportPropertyChanging("WholesaleTaskRatePerMonth");
                _WholesaleTaskRatePerMonth = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("WholesaleTaskRatePerMonth");
                OnWholesaleTaskRatePerMonthChanged();
            }
        }
        private Nullable<global::System.Decimal> _WholesaleTaskRatePerMonth;
        partial void OnWholesaleTaskRatePerMonthChanging(Nullable<global::System.Decimal> value);
        partial void OnWholesaleTaskRatePerMonthChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Decimal> WholesaleTaskRatePerDay
        {
            get
            {
                return _WholesaleTaskRatePerDay;
            }
            set
            {
                OnWholesaleTaskRatePerDayChanging(value);
                ReportPropertyChanging("WholesaleTaskRatePerDay");
                _WholesaleTaskRatePerDay = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("WholesaleTaskRatePerDay");
                OnWholesaleTaskRatePerDayChanged();
            }
        }
        private Nullable<global::System.Decimal> _WholesaleTaskRatePerDay;
        partial void OnWholesaleTaskRatePerDayChanging(Nullable<global::System.Decimal> value);
        partial void OnWholesaleTaskRatePerDayChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Decimal> WholesaleTaskRatePerHour
        {
            get
            {
                return _WholesaleTaskRatePerHour;
            }
            set
            {
                OnWholesaleTaskRatePerHourChanging(value);
                ReportPropertyChanging("WholesaleTaskRatePerHour");
                _WholesaleTaskRatePerHour = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("WholesaleTaskRatePerHour");
                OnWholesaleTaskRatePerHourChanged();
            }
        }
        private Nullable<global::System.Decimal> _WholesaleTaskRatePerHour;
        partial void OnWholesaleTaskRatePerHourChanging(Nullable<global::System.Decimal> value);
        partial void OnWholesaleTaskRatePerHourChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Boolean> IsBillable
        {
            get
            {
                return _IsBillable;
            }
            set
            {
                OnIsBillableChanging(value);
                ReportPropertyChanging("IsBillable");
                _IsBillable = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("IsBillable");
                OnIsBillableChanged();
            }
        }
        private Nullable<global::System.Boolean> _IsBillable;
        partial void OnIsBillableChanging(Nullable<global::System.Boolean> value);
        partial void OnIsBillableChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Boolean> AllProjects
        {
            get
            {
                return _AllProjects;
            }
            set
            {
                OnAllProjectsChanging(value);
                ReportPropertyChanging("AllProjects");
                _AllProjects = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("AllProjects");
                OnAllProjectsChanged();
            }
        }
        private Nullable<global::System.Boolean> _AllProjects;
        partial void OnAllProjectsChanging(Nullable<global::System.Boolean> value);
        partial void OnAllProjectsChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Decimal WholesalePrice
        {
            get
            {
                return _WholesalePrice;
            }
            set
            {
                OnWholesalePriceChanging(value);
                ReportPropertyChanging("WholesalePrice");
                _WholesalePrice = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("WholesalePrice");
                OnWholesalePriceChanged();
            }
        }
        private global::System.Decimal _WholesalePrice;
        partial void OnWholesalePriceChanging(global::System.Decimal value);
        partial void OnWholesalePriceChanged();

        #endregion

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

        #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 SifreNamjena
        {
            get
            {
                return _SifreNamjena;
            }
            set
            {
                OnSifreNamjenaChanging(value);
                ReportPropertyChanging("SifreNamjena");
                _SifreNamjena = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("SifreNamjena");
                OnSifreNamjenaChanged();
            }
        }
        private global::System.String _SifreNamjena;
        partial void OnSifreNamjenaChanging(global::System.String value);
        partial void OnSifreNamjenaChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String Naziv
        {
            get
            {
                return _Naziv;
            }
            set
            {
                OnNazivChanging(value);
                ReportPropertyChanging("Naziv");
                _Naziv = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Naziv");
                OnNazivChanged();
            }
        }
        private global::System.String _Naziv;
        partial void OnNazivChanging(global::System.String value);
        partial void OnNazivChanged();

        #endregion

    
    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="MDEntitiesModel", Name="vEntities")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class vEntities : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new vEntities object.
        /// </summary>
        /// <param name="id">Initial value of the Id property.</param>
        /// <param name="wholesalePrice">Initial value of the WholesalePrice property.</param>
        /// <param name="entityType">Initial value of the EntityType property.</param>
        /// <param name="taxRateId">Initial value of the TaxRateId property.</param>
        /// <param name="unitId">Initial value of the UnitId property.</param>
        /// <param name="label">Initial value of the Label property.</param>
        /// <param name="name">Initial value of the Name property.</param>
        /// <param name="inactive">Initial value of the Inactive property.</param>
        /// <param name="companyUsingServiceId">Initial value of the CompanyUsingServiceId property.</param>
        public static vEntities CreatevEntities(global::System.Int32 id, global::System.Decimal wholesalePrice, global::System.Int16 entityType, global::System.Int32 taxRateId, global::System.Int32 unitId, global::System.String label, global::System.String name, global::System.Boolean inactive, global::System.Int32 companyUsingServiceId)
        {
            vEntities vEntities = new vEntities();
            vEntities.Id = id;
            vEntities.WholesalePrice = wholesalePrice;
            vEntities.EntityType = entityType;
            vEntities.TaxRateId = taxRateId;
            vEntities.UnitId = unitId;
            vEntities.Label = label;
            vEntities.Name = name;
            vEntities.Inactive = inactive;
            vEntities.CompanyUsingServiceId = companyUsingServiceId;
            return vEntities;
        }

        #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.Decimal WholesalePrice
        {
            get
            {
                return _WholesalePrice;
            }
            set
            {
                OnWholesalePriceChanging(value);
                ReportPropertyChanging("WholesalePrice");
                _WholesalePrice = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("WholesalePrice");
                OnWholesalePriceChanged();
            }
        }
        private global::System.Decimal _WholesalePrice;
        partial void OnWholesalePriceChanging(global::System.Decimal value);
        partial void OnWholesalePriceChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int16 EntityType
        {
            get
            {
                return _EntityType;
            }
            set
            {
                OnEntityTypeChanging(value);
                ReportPropertyChanging("EntityType");
                _EntityType = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("EntityType");
                OnEntityTypeChanged();
            }
        }
        private global::System.Int16 _EntityType;
        partial void OnEntityTypeChanging(global::System.Int16 value);
        partial void OnEntityTypeChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 TaxRateId
        {
            get
            {
                return _TaxRateId;
            }
            set
            {
                OnTaxRateIdChanging(value);
                ReportPropertyChanging("TaxRateId");
                _TaxRateId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("TaxRateId");
                OnTaxRateIdChanged();
            }
        }
        private global::System.Int32 _TaxRateId;
        partial void OnTaxRateIdChanging(global::System.Int32 value);
        partial void OnTaxRateIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 UnitId
        {
            get
            {
                return _UnitId;
            }
            set
            {
                OnUnitIdChanging(value);
                ReportPropertyChanging("UnitId");
                _UnitId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("UnitId");
                OnUnitIdChanged();
            }
        }
        private global::System.Int32 _UnitId;
        partial void OnUnitIdChanging(global::System.Int32 value);
        partial void OnUnitIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String Label
        {
            get
            {
                return _Label;
            }
            set
            {
                OnLabelChanging(value);
                ReportPropertyChanging("Label");
                _Label = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Label");
                OnLabelChanged();
            }
        }
        private global::System.String _Label;
        partial void OnLabelChanging(global::System.String value);
        partial void OnLabelChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String Name
        {
            get
            {
                return _Name;
            }
            set
            {
                OnNameChanging(value);
                ReportPropertyChanging("Name");
                _Name = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Name");
                OnNameChanged();
            }
        }
        private global::System.String _Name;
        partial void OnNameChanging(global::System.String value);
        partial void OnNameChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Boolean Inactive
        {
            get
            {
                return _Inactive;
            }
            set
            {
                OnInactiveChanging(value);
                ReportPropertyChanging("Inactive");
                _Inactive = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Inactive");
                OnInactiveChanged();
            }
        }
        private global::System.Boolean _Inactive;
        partial void OnInactiveChanging(global::System.Boolean value);
        partial void OnInactiveChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 CompanyUsingServiceId
        {
            get
            {
                return _CompanyUsingServiceId;
            }
            set
            {
                OnCompanyUsingServiceIdChanging(value);
                ReportPropertyChanging("CompanyUsingServiceId");
                _CompanyUsingServiceId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("CompanyUsingServiceId");
                OnCompanyUsingServiceIdChanged();
            }
        }
        private global::System.Int32 _CompanyUsingServiceId;
        partial void OnCompanyUsingServiceIdChanging(global::System.Int32 value);
        partial void OnCompanyUsingServiceIdChanged();

        #endregion

    
    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="MDEntitiesModel", Name="vEnums_TaxRate")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class vEnums_TaxRate : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new vEnums_TaxRate object.
        /// </summary>
        /// <param name="id">Initial value of the Id property.</param>
        /// <param name="name">Initial value of the Name property.</param>
        /// <param name="percentage">Initial value of the Percentage property.</param>
        /// <param name="inactive">Initial value of the Inactive property.</param>
        public static vEnums_TaxRate CreatevEnums_TaxRate(global::System.Int32 id, global::System.String name, global::System.Decimal percentage, global::System.Boolean inactive)
        {
            vEnums_TaxRate vEnums_TaxRate = new vEnums_TaxRate();
            vEnums_TaxRate.Id = id;
            vEnums_TaxRate.Name = name;
            vEnums_TaxRate.Percentage = percentage;
            vEnums_TaxRate.Inactive = inactive;
            return vEnums_TaxRate;
        }

        #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();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Decimal Percentage
        {
            get
            {
                return _Percentage;
            }
            set
            {
                OnPercentageChanging(value);
                ReportPropertyChanging("Percentage");
                _Percentage = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Percentage");
                OnPercentageChanged();
            }
        }
        private global::System.Decimal _Percentage;
        partial void OnPercentageChanging(global::System.Decimal value);
        partial void OnPercentageChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String Description
        {
            get
            {
                return _Description;
            }
            set
            {
                OnDescriptionChanging(value);
                ReportPropertyChanging("Description");
                _Description = StructuralObject.SetValidValue(value, true);
                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=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> CompanyUsingServiceId
        {
            get
            {
                return _CompanyUsingServiceId;
            }
            set
            {
                OnCompanyUsingServiceIdChanging(value);
                ReportPropertyChanging("CompanyUsingServiceId");
                _CompanyUsingServiceId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("CompanyUsingServiceId");
                OnCompanyUsingServiceIdChanged();
            }
        }
        private Nullable<global::System.Int32> _CompanyUsingServiceId;
        partial void OnCompanyUsingServiceIdChanging(Nullable<global::System.Int32> value);
        partial void OnCompanyUsingServiceIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String ClientName
        {
            get
            {
                return _ClientName;
            }
            set
            {
                OnClientNameChanging(value);
                ReportPropertyChanging("ClientName");
                _ClientName = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("ClientName");
                OnClientNameChanged();
            }
        }
        private global::System.String _ClientName;
        partial void OnClientNameChanging(global::System.String value);
        partial void OnClientNameChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Boolean Inactive
        {
            get
            {
                return _Inactive;
            }
            set
            {
                OnInactiveChanging(value);
                ReportPropertyChanging("Inactive");
                _Inactive = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Inactive");
                OnInactiveChanged();
            }
        }
        private global::System.Boolean _Inactive;
        partial void OnInactiveChanging(global::System.Boolean value);
        partial void OnInactiveChanged();

        #endregion

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

        #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();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String Label
        {
            get
            {
                return _Label;
            }
            set
            {
                OnLabelChanging(value);
                ReportPropertyChanging("Label");
                _Label = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Label");
                OnLabelChanged();
            }
        }
        private global::System.String _Label;
        partial void OnLabelChanging(global::System.String value);
        partial void OnLabelChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Int32> CompanyUsingServiceId
        {
            get
            {
                return _CompanyUsingServiceId;
            }
            set
            {
                OnCompanyUsingServiceIdChanging(value);
                ReportPropertyChanging("CompanyUsingServiceId");
                _CompanyUsingServiceId = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("CompanyUsingServiceId");
                OnCompanyUsingServiceIdChanged();
            }
        }
        private Nullable<global::System.Int32> _CompanyUsingServiceId;
        partial void OnCompanyUsingServiceIdChanging(Nullable<global::System.Int32> value);
        partial void OnCompanyUsingServiceIdChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String ClientName
        {
            get
            {
                return _ClientName;
            }
            set
            {
                OnClientNameChanging(value);
                ReportPropertyChanging("ClientName");
                _ClientName = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("ClientName");
                OnClientNameChanged();
            }
        }
        private global::System.String _ClientName;
        partial void OnClientNameChanging(global::System.String value);
        partial void OnClientNameChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Boolean Inactive
        {
            get
            {
                return _Inactive;
            }
            set
            {
                if (_Inactive != value)
                {
                    OnInactiveChanging(value);
                    ReportPropertyChanging("Inactive");
                    _Inactive = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("Inactive");
                    OnInactiveChanged();
                }
            }
        }
        private global::System.Boolean _Inactive;
        partial void OnInactiveChanging(global::System.Boolean value);
        partial void OnInactiveChanged();

        #endregion

    
    }

    #endregion

    
}
