﻿//------------------------------------------------------------------------------
// <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("DocOrganizerModel", "FK_Categories_Parent", "Categories", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(DocOrganizer.Model.Category), "Categories1", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(DocOrganizer.Model.Category), true)]
[assembly: EdmRelationshipAttribute("DocOrganizerModel", "FK_CategoryTags_Categories", "Categories", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(DocOrganizer.Model.Category), "CategoryTags", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(DocOrganizer.Model.CategoryTag), true)]
[assembly: EdmRelationshipAttribute("DocOrganizerModel", "FK_DocumentCategories_Categories", "Categories", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(DocOrganizer.Model.Category), "DocumentCategories", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(DocOrganizer.Model.DocumentCategory), true)]
[assembly: EdmRelationshipAttribute("DocOrganizerModel", "FK_PathCategories_Categories", "Categories", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(DocOrganizer.Model.Category), "PathCategories", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(DocOrganizer.Model.PathCategory), true)]
[assembly: EdmRelationshipAttribute("DocOrganizerModel", "FK_SourceCategory_Categories", "Categories", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(DocOrganizer.Model.Category), "SourceCategory", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(DocOrganizer.Model.SourceCategory), true)]
[assembly: EdmRelationshipAttribute("DocOrganizerModel", "FK_CategoryTags_Tags", "Tags", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(DocOrganizer.Model.Tag), "CategoryTags", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(DocOrganizer.Model.CategoryTag), true)]
[assembly: EdmRelationshipAttribute("DocOrganizerModel", "FK_DocumentCategories_Documents", "Documents", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(DocOrganizer.Model.Document), "DocumentCategories", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(DocOrganizer.Model.DocumentCategory), true)]
[assembly: EdmRelationshipAttribute("DocOrganizerModel", "FK_Documents_Paths", "Paths", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(DocOrganizer.Model.Path), "Documents", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(DocOrganizer.Model.Document), true)]
[assembly: EdmRelationshipAttribute("DocOrganizerModel", "FK_Documents_Sources", "Sources", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(DocOrganizer.Model.Source), "Documents", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(DocOrganizer.Model.Document), true)]
[assembly: EdmRelationshipAttribute("DocOrganizerModel", "FK_DocumentTags_Documents", "Documents", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(DocOrganizer.Model.Document), "DocumentTags", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(DocOrganizer.Model.DocumentTag), true)]
[assembly: EdmRelationshipAttribute("DocOrganizerModel", "FK_DocumentTags_Tags", "Tags", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(DocOrganizer.Model.Tag), "DocumentTags", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(DocOrganizer.Model.DocumentTag), true)]
[assembly: EdmRelationshipAttribute("DocOrganizerModel", "FK_EmailSource_Sources", "Sources", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(DocOrganizer.Model.Source), "EmailSource", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(DocOrganizer.Model.EmailSource), true)]
[assembly: EdmRelationshipAttribute("DocOrganizerModel", "FK_PathCategories_Paths", "Paths", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(DocOrganizer.Model.Path), "PathCategories", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(DocOrganizer.Model.PathCategory), true)]
[assembly: EdmRelationshipAttribute("DocOrganizerModel", "FK_Paths_Parent", "Paths", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(DocOrganizer.Model.Path), "Paths1", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(DocOrganizer.Model.Path), true)]
[assembly: EdmRelationshipAttribute("DocOrganizerModel", "FK_Paths_Sources", "Sources", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(DocOrganizer.Model.Source), "Paths", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(DocOrganizer.Model.Path), true)]
[assembly: EdmRelationshipAttribute("DocOrganizerModel", "FK_PathTags_Paths", "Paths", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(DocOrganizer.Model.Path), "PathTags", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(DocOrganizer.Model.PathTag), true)]
[assembly: EdmRelationshipAttribute("DocOrganizerModel", "FK_PathTags_Tags", "Tags", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(DocOrganizer.Model.Tag), "PathTags", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(DocOrganizer.Model.PathTag), true)]
[assembly: EdmRelationshipAttribute("DocOrganizerModel", "FK_SourceCategory_Sources", "Sources", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(DocOrganizer.Model.Source), "SourceCategory", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(DocOrganizer.Model.SourceCategory), true)]
[assembly: EdmRelationshipAttribute("DocOrganizerModel", "FK_SourceTag_Sources", "Sources", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(DocOrganizer.Model.Source), "SourceTag", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(DocOrganizer.Model.SourceTag), true)]
[assembly: EdmRelationshipAttribute("DocOrganizerModel", "FK_WebHosts_Sources", "Sources", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(DocOrganizer.Model.Source), "WebHosts", System.Data.Metadata.Edm.RelationshipMultiplicity.ZeroOrOne, typeof(DocOrganizer.Model.WebHost), true)]
[assembly: EdmRelationshipAttribute("DocOrganizerModel", "FK_SourceTag_Tags", "Tags", System.Data.Metadata.Edm.RelationshipMultiplicity.One, typeof(DocOrganizer.Model.Tag), "SourceTag", System.Data.Metadata.Edm.RelationshipMultiplicity.Many, typeof(DocOrganizer.Model.SourceTag), true)]

#endregion

namespace DocOrganizer.Model
{
    #region Contexts
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    public partial class DocOrganizerEntities : ObjectContext
    {
        #region Constructors
    
        /// <summary>
        /// Initializes a new DocOrganizerEntities object using the connection string found in the 'DocOrganizerEntities' section of the application configuration file.
        /// </summary>
        public DocOrganizerEntities() : base("name=DocOrganizerEntities", "DocOrganizerEntities")
        {
            this.ContextOptions.LazyLoadingEnabled = true;
            OnContextCreated();
        }
    
        /// <summary>
        /// Initialize a new DocOrganizerEntities object.
        /// </summary>
        public DocOrganizerEntities(string connectionString) : base(connectionString, "DocOrganizerEntities")
        {
            this.ContextOptions.LazyLoadingEnabled = true;
            OnContextCreated();
        }
    
        /// <summary>
        /// Initialize a new DocOrganizerEntities object.
        /// </summary>
        public DocOrganizerEntities(EntityConnection connection) : base(connection, "DocOrganizerEntities")
        {
            this.ContextOptions.LazyLoadingEnabled = true;
            OnContextCreated();
        }
    
        #endregion
    
        #region Partial Methods
    
        partial void OnContextCreated();
    
        #endregion
    
        #region ObjectSet Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<Category> Categories
        {
            get
            {
                if ((_Categories == null))
                {
                    _Categories = base.CreateObjectSet<Category>("Categories");
                }
                return _Categories;
            }
        }
        private ObjectSet<Category> _Categories;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<CategoryTag> CategoryTags
        {
            get
            {
                if ((_CategoryTags == null))
                {
                    _CategoryTags = base.CreateObjectSet<CategoryTag>("CategoryTags");
                }
                return _CategoryTags;
            }
        }
        private ObjectSet<CategoryTag> _CategoryTags;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<DocumentCategory> DocumentCategories
        {
            get
            {
                if ((_DocumentCategories == null))
                {
                    _DocumentCategories = base.CreateObjectSet<DocumentCategory>("DocumentCategories");
                }
                return _DocumentCategories;
            }
        }
        private ObjectSet<DocumentCategory> _DocumentCategories;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<Document> Documents
        {
            get
            {
                if ((_Documents == null))
                {
                    _Documents = base.CreateObjectSet<Document>("Documents");
                }
                return _Documents;
            }
        }
        private ObjectSet<Document> _Documents;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<DocumentTag> DocumentTags
        {
            get
            {
                if ((_DocumentTags == null))
                {
                    _DocumentTags = base.CreateObjectSet<DocumentTag>("DocumentTags");
                }
                return _DocumentTags;
            }
        }
        private ObjectSet<DocumentTag> _DocumentTags;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<EmailSource> EmailSources
        {
            get
            {
                if ((_EmailSources == null))
                {
                    _EmailSources = base.CreateObjectSet<EmailSource>("EmailSources");
                }
                return _EmailSources;
            }
        }
        private ObjectSet<EmailSource> _EmailSources;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<PathCategory> PathCategories
        {
            get
            {
                if ((_PathCategories == null))
                {
                    _PathCategories = base.CreateObjectSet<PathCategory>("PathCategories");
                }
                return _PathCategories;
            }
        }
        private ObjectSet<PathCategory> _PathCategories;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<Path> Paths
        {
            get
            {
                if ((_Paths == null))
                {
                    _Paths = base.CreateObjectSet<Path>("Paths");
                }
                return _Paths;
            }
        }
        private ObjectSet<Path> _Paths;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<PathTag> PathTags
        {
            get
            {
                if ((_PathTags == null))
                {
                    _PathTags = base.CreateObjectSet<PathTag>("PathTags");
                }
                return _PathTags;
            }
        }
        private ObjectSet<PathTag> _PathTags;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<SourceCategory> SourceCategories
        {
            get
            {
                if ((_SourceCategories == null))
                {
                    _SourceCategories = base.CreateObjectSet<SourceCategory>("SourceCategories");
                }
                return _SourceCategories;
            }
        }
        private ObjectSet<SourceCategory> _SourceCategories;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<Source> Sources
        {
            get
            {
                if ((_Sources == null))
                {
                    _Sources = base.CreateObjectSet<Source>("Sources");
                }
                return _Sources;
            }
        }
        private ObjectSet<Source> _Sources;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<SourceTag> SourceTags
        {
            get
            {
                if ((_SourceTags == null))
                {
                    _SourceTags = base.CreateObjectSet<SourceTag>("SourceTags");
                }
                return _SourceTags;
            }
        }
        private ObjectSet<SourceTag> _SourceTags;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<Tag> Tags
        {
            get
            {
                if ((_Tags == null))
                {
                    _Tags = base.CreateObjectSet<Tag>("Tags");
                }
                return _Tags;
            }
        }
        private ObjectSet<Tag> _Tags;
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        public ObjectSet<WebHost> WebHosts
        {
            get
            {
                if ((_WebHosts == null))
                {
                    _WebHosts = base.CreateObjectSet<WebHost>("WebHosts");
                }
                return _WebHosts;
            }
        }
        private ObjectSet<WebHost> _WebHosts;

        #endregion

        #region AddTo Methods
    
        /// <summary>
        /// Deprecated Method for adding a new object to the Categories EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToCategories(Category category)
        {
            base.AddObject("Categories", category);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the CategoryTags EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToCategoryTags(CategoryTag categoryTag)
        {
            base.AddObject("CategoryTags", categoryTag);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the DocumentCategories EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToDocumentCategories(DocumentCategory documentCategory)
        {
            base.AddObject("DocumentCategories", documentCategory);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the Documents EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToDocuments(Document document)
        {
            base.AddObject("Documents", document);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the DocumentTags EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToDocumentTags(DocumentTag documentTag)
        {
            base.AddObject("DocumentTags", documentTag);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the EmailSources EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToEmailSources(EmailSource emailSource)
        {
            base.AddObject("EmailSources", emailSource);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the PathCategories EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToPathCategories(PathCategory pathCategory)
        {
            base.AddObject("PathCategories", pathCategory);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the Paths EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToPaths(Path path)
        {
            base.AddObject("Paths", path);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the PathTags EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToPathTags(PathTag pathTag)
        {
            base.AddObject("PathTags", pathTag);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the SourceCategories EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToSourceCategories(SourceCategory sourceCategory)
        {
            base.AddObject("SourceCategories", sourceCategory);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the Sources EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToSources(Source source)
        {
            base.AddObject("Sources", source);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the SourceTags EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToSourceTags(SourceTag sourceTag)
        {
            base.AddObject("SourceTags", sourceTag);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the Tags EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToTags(Tag tag)
        {
            base.AddObject("Tags", tag);
        }
    
        /// <summary>
        /// Deprecated Method for adding a new object to the WebHosts EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
        /// </summary>
        public void AddToWebHosts(WebHost webHost)
        {
            base.AddObject("WebHosts", webHost);
        }

        #endregion

    }

    #endregion

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

        #endregion

        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Guid ID
        {
            get
            {
                return _ID;
            }
            set
            {
                if (_ID != value)
                {
                    OnIDChanging(value);
                    ReportPropertyChanging("ID");
                    _ID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("ID");
                    OnIDChanged();
                }
            }
        }
        private global::System.Guid _ID;
        partial void OnIDChanging(global::System.Guid 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 Description
        {
            get
            {
                return _Description;
            }
            set
            {
                OnDescriptionChanging(value);
                ReportPropertyChanging("Description");
                _Description = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Description");
                OnDescriptionChanged();
            }
        }
        private global::System.String _Description;
        partial void OnDescriptionChanging(global::System.String value);
        partial void OnDescriptionChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Guid> ParentID
        {
            get
            {
                return _ParentID;
            }
            set
            {
                OnParentIDChanging(value);
                ReportPropertyChanging("ParentID");
                _ParentID = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("ParentID");
                OnParentIDChanged();
            }
        }
        private Nullable<global::System.Guid> _ParentID;
        partial void OnParentIDChanging(Nullable<global::System.Guid> value);
        partial void OnParentIDChanged();

        #endregion

    
        #region Navigation Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("DocOrganizerModel", "FK_Categories_Parent", "Categories1")]
        public EntityCollection<Category> Categories1
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<Category>("DocOrganizerModel.FK_Categories_Parent", "Categories1");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<Category>("DocOrganizerModel.FK_Categories_Parent", "Categories1", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("DocOrganizerModel", "FK_Categories_Parent", "Categories")]
        public Category Category1
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Category>("DocOrganizerModel.FK_Categories_Parent", "Categories").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Category>("DocOrganizerModel.FK_Categories_Parent", "Categories").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Category> Category1Reference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Category>("DocOrganizerModel.FK_Categories_Parent", "Categories");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Category>("DocOrganizerModel.FK_Categories_Parent", "Categories", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("DocOrganizerModel", "FK_CategoryTags_Categories", "CategoryTags")]
        public EntityCollection<CategoryTag> CategoryTags
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<CategoryTag>("DocOrganizerModel.FK_CategoryTags_Categories", "CategoryTags");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<CategoryTag>("DocOrganizerModel.FK_CategoryTags_Categories", "CategoryTags", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("DocOrganizerModel", "FK_DocumentCategories_Categories", "DocumentCategories")]
        public EntityCollection<DocumentCategory> DocumentCategories
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<DocumentCategory>("DocOrganizerModel.FK_DocumentCategories_Categories", "DocumentCategories");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<DocumentCategory>("DocOrganizerModel.FK_DocumentCategories_Categories", "DocumentCategories", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("DocOrganizerModel", "FK_PathCategories_Categories", "PathCategories")]
        public EntityCollection<PathCategory> PathCategories
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<PathCategory>("DocOrganizerModel.FK_PathCategories_Categories", "PathCategories");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<PathCategory>("DocOrganizerModel.FK_PathCategories_Categories", "PathCategories", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("DocOrganizerModel", "FK_SourceCategory_Categories", "SourceCategory")]
        public EntityCollection<SourceCategory> SourceCategories
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<SourceCategory>("DocOrganizerModel.FK_SourceCategory_Categories", "SourceCategory");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<SourceCategory>("DocOrganizerModel.FK_SourceCategory_Categories", "SourceCategory", value);
                }
            }
        }

        #endregion

    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="DocOrganizerModel", Name="CategoryTag")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class CategoryTag : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new CategoryTag object.
        /// </summary>
        /// <param name="categoryID">Initial value of the CategoryID property.</param>
        /// <param name="tagID">Initial value of the TagID property.</param>
        /// <param name="order">Initial value of the Order property.</param>
        public static CategoryTag CreateCategoryTag(global::System.Guid categoryID, global::System.Guid tagID, global::System.Int32 order)
        {
            CategoryTag categoryTag = new CategoryTag();
            categoryTag.CategoryID = categoryID;
            categoryTag.TagID = tagID;
            categoryTag.Order = order;
            return categoryTag;
        }

        #endregion

        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Guid CategoryID
        {
            get
            {
                return _CategoryID;
            }
            set
            {
                if (_CategoryID != value)
                {
                    OnCategoryIDChanging(value);
                    ReportPropertyChanging("CategoryID");
                    _CategoryID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("CategoryID");
                    OnCategoryIDChanged();
                }
            }
        }
        private global::System.Guid _CategoryID;
        partial void OnCategoryIDChanging(global::System.Guid value);
        partial void OnCategoryIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Guid TagID
        {
            get
            {
                return _TagID;
            }
            set
            {
                if (_TagID != value)
                {
                    OnTagIDChanging(value);
                    ReportPropertyChanging("TagID");
                    _TagID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("TagID");
                    OnTagIDChanged();
                }
            }
        }
        private global::System.Guid _TagID;
        partial void OnTagIDChanging(global::System.Guid value);
        partial void OnTagIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 Order
        {
            get
            {
                return _Order;
            }
            set
            {
                OnOrderChanging(value);
                ReportPropertyChanging("Order");
                _Order = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Order");
                OnOrderChanged();
            }
        }
        private global::System.Int32 _Order;
        partial void OnOrderChanging(global::System.Int32 value);
        partial void OnOrderChanged();

        #endregion

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

        #endregion

    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="DocOrganizerModel", Name="Document")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class Document : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new Document object.
        /// </summary>
        /// <param name="id">Initial value of the ID property.</param>
        /// <param name="query">Initial value of the Query property.</param>
        /// <param name="fragent">Initial value of the Fragent property.</param>
        /// <param name="title">Initial value of the Title property.</param>
        /// <param name="description">Initial value of the Description property.</param>
        /// <param name="docTimestamp">Initial value of the DocTimestamp property.</param>
        public static Document CreateDocument(global::System.Guid id, global::System.String query, global::System.String fragent, global::System.String title, global::System.String description, global::System.DateTime docTimestamp)
        {
            Document document = new Document();
            document.ID = id;
            document.Query = query;
            document.Fragent = fragent;
            document.Title = title;
            document.Description = description;
            document.DocTimestamp = docTimestamp;
            return document;
        }

        #endregion

        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Guid ID
        {
            get
            {
                return _ID;
            }
            set
            {
                if (_ID != value)
                {
                    OnIDChanging(value);
                    ReportPropertyChanging("ID");
                    _ID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("ID");
                    OnIDChanged();
                }
            }
        }
        private global::System.Guid _ID;
        partial void OnIDChanging(global::System.Guid value);
        partial void OnIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String Query
        {
            get
            {
                return _Query;
            }
            set
            {
                OnQueryChanging(value);
                ReportPropertyChanging("Query");
                _Query = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Query");
                OnQueryChanged();
            }
        }
        private global::System.String _Query;
        partial void OnQueryChanging(global::System.String value);
        partial void OnQueryChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String Fragent
        {
            get
            {
                return _Fragent;
            }
            set
            {
                OnFragentChanging(value);
                ReportPropertyChanging("Fragent");
                _Fragent = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Fragent");
                OnFragentChanged();
            }
        }
        private global::System.String _Fragent;
        partial void OnFragentChanging(global::System.String value);
        partial void OnFragentChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String Title
        {
            get
            {
                return _Title;
            }
            set
            {
                OnTitleChanging(value);
                ReportPropertyChanging("Title");
                _Title = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Title");
                OnTitleChanged();
            }
        }
        private global::System.String _Title;
        partial void OnTitleChanging(global::System.String value);
        partial void OnTitleChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String Description
        {
            get
            {
                return _Description;
            }
            set
            {
                OnDescriptionChanging(value);
                ReportPropertyChanging("Description");
                _Description = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Description");
                OnDescriptionChanged();
            }
        }
        private global::System.String _Description;
        partial void OnDescriptionChanging(global::System.String value);
        partial void OnDescriptionChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.DateTime DocTimestamp
        {
            get
            {
                return _DocTimestamp;
            }
            set
            {
                OnDocTimestampChanging(value);
                ReportPropertyChanging("DocTimestamp");
                _DocTimestamp = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("DocTimestamp");
                OnDocTimestampChanged();
            }
        }
        private global::System.DateTime _DocTimestamp;
        partial void OnDocTimestampChanging(global::System.DateTime value);
        partial void OnDocTimestampChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Guid> PathID
        {
            get
            {
                return _PathID;
            }
            set
            {
                OnPathIDChanging(value);
                ReportPropertyChanging("PathID");
                _PathID = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("PathID");
                OnPathIDChanged();
            }
        }
        private Nullable<global::System.Guid> _PathID;
        partial void OnPathIDChanging(Nullable<global::System.Guid> value);
        partial void OnPathIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Guid> SourceID
        {
            get
            {
                return _SourceID;
            }
            set
            {
                OnSourceIDChanging(value);
                ReportPropertyChanging("SourceID");
                _SourceID = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("SourceID");
                OnSourceIDChanged();
            }
        }
        private Nullable<global::System.Guid> _SourceID;
        partial void OnSourceIDChanging(Nullable<global::System.Guid> value);
        partial void OnSourceIDChanged();

        #endregion

    
        #region Navigation Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("DocOrganizerModel", "FK_DocumentCategories_Documents", "DocumentCategories")]
        public EntityCollection<DocumentCategory> DocumentCategories
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<DocumentCategory>("DocOrganizerModel.FK_DocumentCategories_Documents", "DocumentCategories");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<DocumentCategory>("DocOrganizerModel.FK_DocumentCategories_Documents", "DocumentCategories", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("DocOrganizerModel", "FK_Documents_Paths", "Paths")]
        public Path Path
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Path>("DocOrganizerModel.FK_Documents_Paths", "Paths").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Path>("DocOrganizerModel.FK_Documents_Paths", "Paths").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Path> PathReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Path>("DocOrganizerModel.FK_Documents_Paths", "Paths");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Path>("DocOrganizerModel.FK_Documents_Paths", "Paths", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("DocOrganizerModel", "FK_Documents_Sources", "Sources")]
        public Source Source
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Source>("DocOrganizerModel.FK_Documents_Sources", "Sources").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Source>("DocOrganizerModel.FK_Documents_Sources", "Sources").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Source> SourceReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Source>("DocOrganizerModel.FK_Documents_Sources", "Sources");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Source>("DocOrganizerModel.FK_Documents_Sources", "Sources", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("DocOrganizerModel", "FK_DocumentTags_Documents", "DocumentTags")]
        public EntityCollection<DocumentTag> DocumentTags
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<DocumentTag>("DocOrganizerModel.FK_DocumentTags_Documents", "DocumentTags");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<DocumentTag>("DocOrganizerModel.FK_DocumentTags_Documents", "DocumentTags", value);
                }
            }
        }

        #endregion

    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="DocOrganizerModel", Name="DocumentCategory")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class DocumentCategory : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new DocumentCategory object.
        /// </summary>
        /// <param name="documentID">Initial value of the DocumentID property.</param>
        /// <param name="categoryID">Initial value of the CategoryID property.</param>
        /// <param name="relevence">Initial value of the Relevence property.</param>
        public static DocumentCategory CreateDocumentCategory(global::System.Guid documentID, global::System.Guid categoryID, global::System.Int32 relevence)
        {
            DocumentCategory documentCategory = new DocumentCategory();
            documentCategory.DocumentID = documentID;
            documentCategory.CategoryID = categoryID;
            documentCategory.Relevence = relevence;
            return documentCategory;
        }

        #endregion

        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Guid DocumentID
        {
            get
            {
                return _DocumentID;
            }
            set
            {
                if (_DocumentID != value)
                {
                    OnDocumentIDChanging(value);
                    ReportPropertyChanging("DocumentID");
                    _DocumentID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("DocumentID");
                    OnDocumentIDChanged();
                }
            }
        }
        private global::System.Guid _DocumentID;
        partial void OnDocumentIDChanging(global::System.Guid value);
        partial void OnDocumentIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Guid CategoryID
        {
            get
            {
                return _CategoryID;
            }
            set
            {
                if (_CategoryID != value)
                {
                    OnCategoryIDChanging(value);
                    ReportPropertyChanging("CategoryID");
                    _CategoryID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("CategoryID");
                    OnCategoryIDChanged();
                }
            }
        }
        private global::System.Guid _CategoryID;
        partial void OnCategoryIDChanging(global::System.Guid value);
        partial void OnCategoryIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 Relevence
        {
            get
            {
                return _Relevence;
            }
            set
            {
                OnRelevenceChanging(value);
                ReportPropertyChanging("Relevence");
                _Relevence = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Relevence");
                OnRelevenceChanged();
            }
        }
        private global::System.Int32 _Relevence;
        partial void OnRelevenceChanging(global::System.Int32 value);
        partial void OnRelevenceChanged();

        #endregion

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

        #endregion

    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="DocOrganizerModel", Name="DocumentTag")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class DocumentTag : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new DocumentTag object.
        /// </summary>
        /// <param name="documentID">Initial value of the DocumentID property.</param>
        /// <param name="tagID">Initial value of the TagID property.</param>
        /// <param name="order">Initial value of the Order property.</param>
        public static DocumentTag CreateDocumentTag(global::System.Guid documentID, global::System.Guid tagID, global::System.Int32 order)
        {
            DocumentTag documentTag = new DocumentTag();
            documentTag.DocumentID = documentID;
            documentTag.TagID = tagID;
            documentTag.Order = order;
            return documentTag;
        }

        #endregion

        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Guid DocumentID
        {
            get
            {
                return _DocumentID;
            }
            set
            {
                if (_DocumentID != value)
                {
                    OnDocumentIDChanging(value);
                    ReportPropertyChanging("DocumentID");
                    _DocumentID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("DocumentID");
                    OnDocumentIDChanged();
                }
            }
        }
        private global::System.Guid _DocumentID;
        partial void OnDocumentIDChanging(global::System.Guid value);
        partial void OnDocumentIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Guid TagID
        {
            get
            {
                return _TagID;
            }
            set
            {
                if (_TagID != value)
                {
                    OnTagIDChanging(value);
                    ReportPropertyChanging("TagID");
                    _TagID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("TagID");
                    OnTagIDChanged();
                }
            }
        }
        private global::System.Guid _TagID;
        partial void OnTagIDChanging(global::System.Guid value);
        partial void OnTagIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 Order
        {
            get
            {
                return _Order;
            }
            set
            {
                OnOrderChanging(value);
                ReportPropertyChanging("Order");
                _Order = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Order");
                OnOrderChanged();
            }
        }
        private global::System.Int32 _Order;
        partial void OnOrderChanging(global::System.Int32 value);
        partial void OnOrderChanged();

        #endregion

    
        #region Navigation Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("DocOrganizerModel", "FK_DocumentTags_Documents", "Documents")]
        public Document Document
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Document>("DocOrganizerModel.FK_DocumentTags_Documents", "Documents").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Document>("DocOrganizerModel.FK_DocumentTags_Documents", "Documents").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Document> DocumentReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Document>("DocOrganizerModel.FK_DocumentTags_Documents", "Documents");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Document>("DocOrganizerModel.FK_DocumentTags_Documents", "Documents", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("DocOrganizerModel", "FK_DocumentTags_Tags", "Tags")]
        public Tag Tag
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Tag>("DocOrganizerModel.FK_DocumentTags_Tags", "Tags").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Tag>("DocOrganizerModel.FK_DocumentTags_Tags", "Tags").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Tag> TagReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Tag>("DocOrganizerModel.FK_DocumentTags_Tags", "Tags");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Tag>("DocOrganizerModel.FK_DocumentTags_Tags", "Tags", value);
                }
            }
        }

        #endregion

    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="DocOrganizerModel", Name="EmailSource")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class EmailSource : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new EmailSource object.
        /// </summary>
        /// <param name="sourceID">Initial value of the SourceID property.</param>
        /// <param name="emailAddress">Initial value of the EmailAddress property.</param>
        public static EmailSource CreateEmailSource(global::System.Guid sourceID, global::System.String emailAddress)
        {
            EmailSource emailSource = new EmailSource();
            emailSource.SourceID = sourceID;
            emailSource.EmailAddress = emailAddress;
            return emailSource;
        }

        #endregion

        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Guid SourceID
        {
            get
            {
                return _SourceID;
            }
            set
            {
                if (_SourceID != value)
                {
                    OnSourceIDChanging(value);
                    ReportPropertyChanging("SourceID");
                    _SourceID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("SourceID");
                    OnSourceIDChanged();
                }
            }
        }
        private global::System.Guid _SourceID;
        partial void OnSourceIDChanging(global::System.Guid value);
        partial void OnSourceIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String EmailAddress
        {
            get
            {
                return _EmailAddress;
            }
            set
            {
                OnEmailAddressChanging(value);
                ReportPropertyChanging("EmailAddress");
                _EmailAddress = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("EmailAddress");
                OnEmailAddressChanged();
            }
        }
        private global::System.String _EmailAddress;
        partial void OnEmailAddressChanging(global::System.String value);
        partial void OnEmailAddressChanged();

        #endregion

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

        #endregion

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

        #endregion

        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Guid ID
        {
            get
            {
                return _ID;
            }
            set
            {
                if (_ID != value)
                {
                    OnIDChanging(value);
                    ReportPropertyChanging("ID");
                    _ID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("ID");
                    OnIDChanged();
                }
            }
        }
        private global::System.Guid _ID;
        partial void OnIDChanging(global::System.Guid 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=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Guid> SourceID
        {
            get
            {
                return _SourceID;
            }
            set
            {
                OnSourceIDChanging(value);
                ReportPropertyChanging("SourceID");
                _SourceID = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("SourceID");
                OnSourceIDChanged();
            }
        }
        private Nullable<global::System.Guid> _SourceID;
        partial void OnSourceIDChanging(Nullable<global::System.Guid> value);
        partial void OnSourceIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public Nullable<global::System.Guid> ParentID
        {
            get
            {
                return _ParentID;
            }
            set
            {
                OnParentIDChanging(value);
                ReportPropertyChanging("ParentID");
                _ParentID = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("ParentID");
                OnParentIDChanged();
            }
        }
        private Nullable<global::System.Guid> _ParentID;
        partial void OnParentIDChanging(Nullable<global::System.Guid> value);
        partial void OnParentIDChanged();

        #endregion

    
        #region Navigation Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("DocOrganizerModel", "FK_Documents_Paths", "Documents")]
        public EntityCollection<Document> Documents
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<Document>("DocOrganizerModel.FK_Documents_Paths", "Documents");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<Document>("DocOrganizerModel.FK_Documents_Paths", "Documents", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("DocOrganizerModel", "FK_PathCategories_Paths", "PathCategories")]
        public EntityCollection<PathCategory> PathCategories
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<PathCategory>("DocOrganizerModel.FK_PathCategories_Paths", "PathCategories");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<PathCategory>("DocOrganizerModel.FK_PathCategories_Paths", "PathCategories", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("DocOrganizerModel", "FK_Paths_Parent", "Paths1")]
        public EntityCollection<Path> Paths1
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<Path>("DocOrganizerModel.FK_Paths_Parent", "Paths1");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<Path>("DocOrganizerModel.FK_Paths_Parent", "Paths1", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("DocOrganizerModel", "FK_Paths_Parent", "Paths")]
        public Path Path1
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Path>("DocOrganizerModel.FK_Paths_Parent", "Paths").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Path>("DocOrganizerModel.FK_Paths_Parent", "Paths").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Path> Path1Reference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Path>("DocOrganizerModel.FK_Paths_Parent", "Paths");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Path>("DocOrganizerModel.FK_Paths_Parent", "Paths", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("DocOrganizerModel", "FK_Paths_Sources", "Sources")]
        public Source Source
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Source>("DocOrganizerModel.FK_Paths_Sources", "Sources").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Source>("DocOrganizerModel.FK_Paths_Sources", "Sources").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Source> SourceReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Source>("DocOrganizerModel.FK_Paths_Sources", "Sources");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Source>("DocOrganizerModel.FK_Paths_Sources", "Sources", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("DocOrganizerModel", "FK_PathTags_Paths", "PathTags")]
        public EntityCollection<PathTag> PathTags
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<PathTag>("DocOrganizerModel.FK_PathTags_Paths", "PathTags");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<PathTag>("DocOrganizerModel.FK_PathTags_Paths", "PathTags", value);
                }
            }
        }

        #endregion

    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="DocOrganizerModel", Name="PathCategory")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class PathCategory : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new PathCategory object.
        /// </summary>
        /// <param name="pathID">Initial value of the PathID property.</param>
        /// <param name="categoryID">Initial value of the CategoryID property.</param>
        /// <param name="relevence">Initial value of the Relevence property.</param>
        public static PathCategory CreatePathCategory(global::System.Guid pathID, global::System.Guid categoryID, global::System.Int32 relevence)
        {
            PathCategory pathCategory = new PathCategory();
            pathCategory.PathID = pathID;
            pathCategory.CategoryID = categoryID;
            pathCategory.Relevence = relevence;
            return pathCategory;
        }

        #endregion

        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Guid PathID
        {
            get
            {
                return _PathID;
            }
            set
            {
                if (_PathID != value)
                {
                    OnPathIDChanging(value);
                    ReportPropertyChanging("PathID");
                    _PathID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("PathID");
                    OnPathIDChanged();
                }
            }
        }
        private global::System.Guid _PathID;
        partial void OnPathIDChanging(global::System.Guid value);
        partial void OnPathIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Guid CategoryID
        {
            get
            {
                return _CategoryID;
            }
            set
            {
                if (_CategoryID != value)
                {
                    OnCategoryIDChanging(value);
                    ReportPropertyChanging("CategoryID");
                    _CategoryID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("CategoryID");
                    OnCategoryIDChanged();
                }
            }
        }
        private global::System.Guid _CategoryID;
        partial void OnCategoryIDChanging(global::System.Guid value);
        partial void OnCategoryIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 Relevence
        {
            get
            {
                return _Relevence;
            }
            set
            {
                OnRelevenceChanging(value);
                ReportPropertyChanging("Relevence");
                _Relevence = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Relevence");
                OnRelevenceChanged();
            }
        }
        private global::System.Int32 _Relevence;
        partial void OnRelevenceChanging(global::System.Int32 value);
        partial void OnRelevenceChanged();

        #endregion

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

        #endregion

    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="DocOrganizerModel", Name="PathTag")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class PathTag : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new PathTag object.
        /// </summary>
        /// <param name="pathID">Initial value of the PathID property.</param>
        /// <param name="tagID">Initial value of the TagID property.</param>
        /// <param name="order">Initial value of the Order property.</param>
        public static PathTag CreatePathTag(global::System.Guid pathID, global::System.Guid tagID, global::System.Int32 order)
        {
            PathTag pathTag = new PathTag();
            pathTag.PathID = pathID;
            pathTag.TagID = tagID;
            pathTag.Order = order;
            return pathTag;
        }

        #endregion

        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Guid PathID
        {
            get
            {
                return _PathID;
            }
            set
            {
                if (_PathID != value)
                {
                    OnPathIDChanging(value);
                    ReportPropertyChanging("PathID");
                    _PathID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("PathID");
                    OnPathIDChanged();
                }
            }
        }
        private global::System.Guid _PathID;
        partial void OnPathIDChanging(global::System.Guid value);
        partial void OnPathIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Guid TagID
        {
            get
            {
                return _TagID;
            }
            set
            {
                if (_TagID != value)
                {
                    OnTagIDChanging(value);
                    ReportPropertyChanging("TagID");
                    _TagID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("TagID");
                    OnTagIDChanged();
                }
            }
        }
        private global::System.Guid _TagID;
        partial void OnTagIDChanging(global::System.Guid value);
        partial void OnTagIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 Order
        {
            get
            {
                return _Order;
            }
            set
            {
                OnOrderChanging(value);
                ReportPropertyChanging("Order");
                _Order = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Order");
                OnOrderChanged();
            }
        }
        private global::System.Int32 _Order;
        partial void OnOrderChanging(global::System.Int32 value);
        partial void OnOrderChanged();

        #endregion

    
        #region Navigation Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("DocOrganizerModel", "FK_PathTags_Paths", "Paths")]
        public Path Path
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Path>("DocOrganizerModel.FK_PathTags_Paths", "Paths").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Path>("DocOrganizerModel.FK_PathTags_Paths", "Paths").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Path> PathReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Path>("DocOrganizerModel.FK_PathTags_Paths", "Paths");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Path>("DocOrganizerModel.FK_PathTags_Paths", "Paths", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("DocOrganizerModel", "FK_PathTags_Tags", "Tags")]
        public Tag Tag
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Tag>("DocOrganizerModel.FK_PathTags_Tags", "Tags").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Tag>("DocOrganizerModel.FK_PathTags_Tags", "Tags").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Tag> TagReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Tag>("DocOrganizerModel.FK_PathTags_Tags", "Tags");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Tag>("DocOrganizerModel.FK_PathTags_Tags", "Tags", value);
                }
            }
        }

        #endregion

    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="DocOrganizerModel", Name="Source")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class Source : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new Source object.
        /// </summary>
        /// <param name="id">Initial value of the ID property.</param>
        /// <param name="title">Initial value of the Title property.</param>
        /// <param name="description">Initial value of the Description property.</param>
        public static Source CreateSource(global::System.Guid id, global::System.String title, global::System.String description)
        {
            Source source = new Source();
            source.ID = id;
            source.Title = title;
            source.Description = description;
            return source;
        }

        #endregion

        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Guid ID
        {
            get
            {
                return _ID;
            }
            set
            {
                if (_ID != value)
                {
                    OnIDChanging(value);
                    ReportPropertyChanging("ID");
                    _ID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("ID");
                    OnIDChanged();
                }
            }
        }
        private global::System.Guid _ID;
        partial void OnIDChanging(global::System.Guid value);
        partial void OnIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String Title
        {
            get
            {
                return _Title;
            }
            set
            {
                OnTitleChanging(value);
                ReportPropertyChanging("Title");
                _Title = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Title");
                OnTitleChanged();
            }
        }
        private global::System.String _Title;
        partial void OnTitleChanging(global::System.String value);
        partial void OnTitleChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String Description
        {
            get
            {
                return _Description;
            }
            set
            {
                OnDescriptionChanging(value);
                ReportPropertyChanging("Description");
                _Description = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Description");
                OnDescriptionChanged();
            }
        }
        private global::System.String _Description;
        partial void OnDescriptionChanging(global::System.String value);
        partial void OnDescriptionChanged();

        #endregion

    
        #region Navigation Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("DocOrganizerModel", "FK_Documents_Sources", "Documents")]
        public EntityCollection<Document> Documents
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<Document>("DocOrganizerModel.FK_Documents_Sources", "Documents");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<Document>("DocOrganizerModel.FK_Documents_Sources", "Documents", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("DocOrganizerModel", "FK_EmailSource_Sources", "EmailSource")]
        public EmailSource EmailSource
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<EmailSource>("DocOrganizerModel.FK_EmailSource_Sources", "EmailSource").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<EmailSource>("DocOrganizerModel.FK_EmailSource_Sources", "EmailSource").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<EmailSource> EmailSourceReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<EmailSource>("DocOrganizerModel.FK_EmailSource_Sources", "EmailSource");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<EmailSource>("DocOrganizerModel.FK_EmailSource_Sources", "EmailSource", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("DocOrganizerModel", "FK_Paths_Sources", "Paths")]
        public EntityCollection<Path> Paths
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<Path>("DocOrganizerModel.FK_Paths_Sources", "Paths");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<Path>("DocOrganizerModel.FK_Paths_Sources", "Paths", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("DocOrganizerModel", "FK_SourceCategory_Sources", "SourceCategory")]
        public EntityCollection<SourceCategory> SourceCategories
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<SourceCategory>("DocOrganizerModel.FK_SourceCategory_Sources", "SourceCategory");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<SourceCategory>("DocOrganizerModel.FK_SourceCategory_Sources", "SourceCategory", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("DocOrganizerModel", "FK_SourceTag_Sources", "SourceTag")]
        public EntityCollection<SourceTag> SourceTags
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<SourceTag>("DocOrganizerModel.FK_SourceTag_Sources", "SourceTag");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<SourceTag>("DocOrganizerModel.FK_SourceTag_Sources", "SourceTag", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("DocOrganizerModel", "FK_WebHosts_Sources", "WebHosts")]
        public WebHost WebHost
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<WebHost>("DocOrganizerModel.FK_WebHosts_Sources", "WebHosts").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<WebHost>("DocOrganizerModel.FK_WebHosts_Sources", "WebHosts").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<WebHost> WebHostReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<WebHost>("DocOrganizerModel.FK_WebHosts_Sources", "WebHosts");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<WebHost>("DocOrganizerModel.FK_WebHosts_Sources", "WebHosts", value);
                }
            }
        }

        #endregion

    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="DocOrganizerModel", Name="SourceCategory")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class SourceCategory : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new SourceCategory object.
        /// </summary>
        /// <param name="sourceID">Initial value of the SourceID property.</param>
        /// <param name="categoryID">Initial value of the CategoryID property.</param>
        /// <param name="relevence">Initial value of the Relevence property.</param>
        public static SourceCategory CreateSourceCategory(global::System.Guid sourceID, global::System.Guid categoryID, global::System.Int32 relevence)
        {
            SourceCategory sourceCategory = new SourceCategory();
            sourceCategory.SourceID = sourceID;
            sourceCategory.CategoryID = categoryID;
            sourceCategory.Relevence = relevence;
            return sourceCategory;
        }

        #endregion

        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Guid SourceID
        {
            get
            {
                return _SourceID;
            }
            set
            {
                if (_SourceID != value)
                {
                    OnSourceIDChanging(value);
                    ReportPropertyChanging("SourceID");
                    _SourceID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("SourceID");
                    OnSourceIDChanged();
                }
            }
        }
        private global::System.Guid _SourceID;
        partial void OnSourceIDChanging(global::System.Guid value);
        partial void OnSourceIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Guid CategoryID
        {
            get
            {
                return _CategoryID;
            }
            set
            {
                if (_CategoryID != value)
                {
                    OnCategoryIDChanging(value);
                    ReportPropertyChanging("CategoryID");
                    _CategoryID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("CategoryID");
                    OnCategoryIDChanged();
                }
            }
        }
        private global::System.Guid _CategoryID;
        partial void OnCategoryIDChanging(global::System.Guid value);
        partial void OnCategoryIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 Relevence
        {
            get
            {
                return _Relevence;
            }
            set
            {
                OnRelevenceChanging(value);
                ReportPropertyChanging("Relevence");
                _Relevence = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Relevence");
                OnRelevenceChanged();
            }
        }
        private global::System.Int32 _Relevence;
        partial void OnRelevenceChanging(global::System.Int32 value);
        partial void OnRelevenceChanged();

        #endregion

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

        #endregion

    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="DocOrganizerModel", Name="SourceTag")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class SourceTag : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new SourceTag object.
        /// </summary>
        /// <param name="sourceID">Initial value of the SourceID property.</param>
        /// <param name="tagID">Initial value of the TagID property.</param>
        /// <param name="relevence">Initial value of the Relevence property.</param>
        public static SourceTag CreateSourceTag(global::System.Guid sourceID, global::System.Guid tagID, global::System.Int32 relevence)
        {
            SourceTag sourceTag = new SourceTag();
            sourceTag.SourceID = sourceID;
            sourceTag.TagID = tagID;
            sourceTag.Relevence = relevence;
            return sourceTag;
        }

        #endregion

        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Guid SourceID
        {
            get
            {
                return _SourceID;
            }
            set
            {
                if (_SourceID != value)
                {
                    OnSourceIDChanging(value);
                    ReportPropertyChanging("SourceID");
                    _SourceID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("SourceID");
                    OnSourceIDChanged();
                }
            }
        }
        private global::System.Guid _SourceID;
        partial void OnSourceIDChanging(global::System.Guid value);
        partial void OnSourceIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Guid TagID
        {
            get
            {
                return _TagID;
            }
            set
            {
                if (_TagID != value)
                {
                    OnTagIDChanging(value);
                    ReportPropertyChanging("TagID");
                    _TagID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("TagID");
                    OnTagIDChanged();
                }
            }
        }
        private global::System.Guid _TagID;
        partial void OnTagIDChanging(global::System.Guid value);
        partial void OnTagIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 Relevence
        {
            get
            {
                return _Relevence;
            }
            set
            {
                OnRelevenceChanging(value);
                ReportPropertyChanging("Relevence");
                _Relevence = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Relevence");
                OnRelevenceChanged();
            }
        }
        private global::System.Int32 _Relevence;
        partial void OnRelevenceChanging(global::System.Int32 value);
        partial void OnRelevenceChanged();

        #endregion

    
        #region Navigation Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("DocOrganizerModel", "FK_SourceTag_Sources", "Sources")]
        public Source Source
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Source>("DocOrganizerModel.FK_SourceTag_Sources", "Sources").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Source>("DocOrganizerModel.FK_SourceTag_Sources", "Sources").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Source> SourceReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Source>("DocOrganizerModel.FK_SourceTag_Sources", "Sources");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Source>("DocOrganizerModel.FK_SourceTag_Sources", "Sources", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("DocOrganizerModel", "FK_SourceTag_Tags", "Tags")]
        public Tag Tag
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Tag>("DocOrganizerModel.FK_SourceTag_Tags", "Tags").Value;
            }
            set
            {
                ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Tag>("DocOrganizerModel.FK_SourceTag_Tags", "Tags").Value = value;
            }
        }
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [BrowsableAttribute(false)]
        [DataMemberAttribute()]
        public EntityReference<Tag> TagReference
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedReference<Tag>("DocOrganizerModel.FK_SourceTag_Tags", "Tags");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedReference<Tag>("DocOrganizerModel.FK_SourceTag_Tags", "Tags", value);
                }
            }
        }

        #endregion

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

        #endregion

        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Guid ID
        {
            get
            {
                return _ID;
            }
            set
            {
                if (_ID != value)
                {
                    OnIDChanging(value);
                    ReportPropertyChanging("ID");
                    _ID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("ID");
                    OnIDChanged();
                }
            }
        }
        private global::System.Guid _ID;
        partial void OnIDChanging(global::System.Guid 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 Description
        {
            get
            {
                return _Description;
            }
            set
            {
                OnDescriptionChanging(value);
                ReportPropertyChanging("Description");
                _Description = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Description");
                OnDescriptionChanged();
            }
        }
        private global::System.String _Description;
        partial void OnDescriptionChanging(global::System.String value);
        partial void OnDescriptionChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Int32 Importance
        {
            get
            {
                return _Importance;
            }
            set
            {
                OnImportanceChanging(value);
                ReportPropertyChanging("Importance");
                _Importance = StructuralObject.SetValidValue(value);
                ReportPropertyChanged("Importance");
                OnImportanceChanged();
            }
        }
        private global::System.Int32 _Importance;
        partial void OnImportanceChanging(global::System.Int32 value);
        partial void OnImportanceChanged();

        #endregion

    
        #region Navigation Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("DocOrganizerModel", "FK_CategoryTags_Tags", "CategoryTags")]
        public EntityCollection<CategoryTag> CategoryTags
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<CategoryTag>("DocOrganizerModel.FK_CategoryTags_Tags", "CategoryTags");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<CategoryTag>("DocOrganizerModel.FK_CategoryTags_Tags", "CategoryTags", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("DocOrganizerModel", "FK_DocumentTags_Tags", "DocumentTags")]
        public EntityCollection<DocumentTag> DocumentTags
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<DocumentTag>("DocOrganizerModel.FK_DocumentTags_Tags", "DocumentTags");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<DocumentTag>("DocOrganizerModel.FK_DocumentTags_Tags", "DocumentTags", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("DocOrganizerModel", "FK_PathTags_Tags", "PathTags")]
        public EntityCollection<PathTag> PathTags
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<PathTag>("DocOrganizerModel.FK_PathTags_Tags", "PathTags");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<PathTag>("DocOrganizerModel.FK_PathTags_Tags", "PathTags", value);
                }
            }
        }
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [XmlIgnoreAttribute()]
        [SoapIgnoreAttribute()]
        [DataMemberAttribute()]
        [EdmRelationshipNavigationPropertyAttribute("DocOrganizerModel", "FK_SourceTag_Tags", "SourceTag")]
        public EntityCollection<SourceTag> SourceTags
        {
            get
            {
                return ((IEntityWithRelationships)this).RelationshipManager.GetRelatedCollection<SourceTag>("DocOrganizerModel.FK_SourceTag_Tags", "SourceTag");
            }
            set
            {
                if ((value != null))
                {
                    ((IEntityWithRelationships)this).RelationshipManager.InitializeRelatedCollection<SourceTag>("DocOrganizerModel.FK_SourceTag_Tags", "SourceTag", value);
                }
            }
        }

        #endregion

    }
    
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    [EdmEntityTypeAttribute(NamespaceName="DocOrganizerModel", Name="WebHost")]
    [Serializable()]
    [DataContractAttribute(IsReference=true)]
    public partial class WebHost : EntityObject
    {
        #region Factory Method
    
        /// <summary>
        /// Create a new WebHost object.
        /// </summary>
        /// <param name="sourceID">Initial value of the SourceID property.</param>
        /// <param name="host">Initial value of the Host property.</param>
        public static WebHost CreateWebHost(global::System.Guid sourceID, global::System.String host)
        {
            WebHost webHost = new WebHost();
            webHost.SourceID = sourceID;
            webHost.Host = host;
            return webHost;
        }

        #endregion

        #region Primitive Properties
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=true, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.Guid SourceID
        {
            get
            {
                return _SourceID;
            }
            set
            {
                if (_SourceID != value)
                {
                    OnSourceIDChanging(value);
                    ReportPropertyChanging("SourceID");
                    _SourceID = StructuralObject.SetValidValue(value);
                    ReportPropertyChanged("SourceID");
                    OnSourceIDChanged();
                }
            }
        }
        private global::System.Guid _SourceID;
        partial void OnSourceIDChanging(global::System.Guid value);
        partial void OnSourceIDChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=false)]
        [DataMemberAttribute()]
        public global::System.String Host
        {
            get
            {
                return _Host;
            }
            set
            {
                OnHostChanging(value);
                ReportPropertyChanging("Host");
                _Host = StructuralObject.SetValidValue(value, false);
                ReportPropertyChanged("Host");
                OnHostChanged();
            }
        }
        private global::System.String _Host;
        partial void OnHostChanging(global::System.String value);
        partial void OnHostChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String Scheme
        {
            get
            {
                return _Scheme;
            }
            set
            {
                OnSchemeChanging(value);
                ReportPropertyChanging("Scheme");
                _Scheme = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Scheme");
                OnSchemeChanged();
            }
        }
        private global::System.String _Scheme;
        partial void OnSchemeChanging(global::System.String value);
        partial void OnSchemeChanged();
    
        /// <summary>
        /// No Metadata Documentation available.
        /// </summary>
        [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
        [DataMemberAttribute()]
        public global::System.String Port
        {
            get
            {
                return _Port;
            }
            set
            {
                OnPortChanging(value);
                ReportPropertyChanging("Port");
                _Port = StructuralObject.SetValidValue(value, true);
                ReportPropertyChanged("Port");
                OnPortChanged();
            }
        }
        private global::System.String _Port;
        partial void OnPortChanging(global::System.String value);
        partial void OnPortChanged();

        #endregion

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

        #endregion

    }

    #endregion

    
}
