//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

using DslModeling = global::Microsoft.VisualStudio.Modeling;
using DslDesign = global::Microsoft.VisualStudio.Modeling.Design;
namespace Microsoft.Data.Entity.Design.EntityDesigner.ViewModel
{
	/// <summary>
	/// DomainClass NameableItem
	/// </summary>
	[System.ComponentModel.TypeDescriptionProvider(typeof(NameableItemDescriptionProvider))]
	[DslDesign::DisplayNameResource("Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.NameableItem.DisplayName", typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel), "Microsoft.Data.Entity.Design.EntityDesigner.GeneratedCode.DomainModelResx")]
	[DslDesign::DescriptionResource("Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.NameableItem.Description", typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel), "Microsoft.Data.Entity.Design.EntityDesigner.GeneratedCode.DomainModelResx")]
	[DslModeling::DomainModelOwner(typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel))]
	[global::System.Diagnostics.DebuggerDisplay("{GetType().Name,nq} (Name = {namePropertyStorage})")]
	[DslModeling::DomainObjectId("1f4b5cb5-f13b-48d2-8dbe-a9cc4bf162f4")]
	internal abstract partial class NameableItem : DslModeling::ModelElement
	{
		#region Constructors, domain class Id
	
		/// <summary>
		/// NameableItem domain class Id.
		/// </summary>
		public static readonly new global::System.Guid DomainClassId = new global::System.Guid(0x1f4b5cb5, 0xf13b, 0x48d2, 0x8d, 0xbe, 0xa9, 0xcc, 0x4b, 0xf1, 0x62, 0xf4);
		/// <summary>
		/// Constructor.
		/// </summary>
		/// <param name="partition">Partition where new element is to be created.</param>
		/// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
		protected NameableItem(DslModeling::Partition partition, DslModeling::PropertyAssignment[] propertyAssignments)
			: base(partition, propertyAssignments)
		{
		}
		#endregion
		#region Name domain property code
		
		/// <summary>
		/// Name domain property Id.
		/// </summary>
		public static readonly global::System.Guid NameDomainPropertyId = new global::System.Guid(0x2bb18667, 0xdb4e, 0x48b5, 0xb0, 0x50, 0xba, 0x1f, 0x2f, 0x4f, 0x5c, 0x9a);
		
		/// <summary>
		/// Storage for Name
		/// </summary>
		private global::System.String namePropertyStorage = string.Empty;
		
		/// <summary>
		/// Gets or sets the value of Name domain property.
		/// Description for
		/// Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.NameableItem.Name
		/// </summary>
		[DslDesign::DisplayNameResource("Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.NameableItem/Name.DisplayName", typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel), "Microsoft.Data.Entity.Design.EntityDesigner.GeneratedCode.DomainModelResx")]
		[DslDesign::DescriptionResource("Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.NameableItem/Name.Description", typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel), "Microsoft.Data.Entity.Design.EntityDesigner.GeneratedCode.DomainModelResx")]
		[global::System.ComponentModel.Browsable(false)]
		[DslModeling::ElementName(typeof(NameableItemNameProvider))]
		[DslModeling::DomainObjectId("2bb18667-db4e-48b5-b050-ba1f2f4f5c9a")]
		public global::System.String Name
		{
			[global::System.Diagnostics.DebuggerStepThrough]
			get
			{
				return namePropertyStorage;
			}
			[global::System.Diagnostics.DebuggerStepThrough]
			set
			{
				NamePropertyHandler.Instance.SetValue(this, value);
			}
		}
		/// <summary>
		/// Value handler for the NameableItem.Name domain property.
		/// </summary>
		internal sealed partial class NamePropertyHandler : DslModeling::DomainPropertyValueHandler<NameableItem, global::System.String>
		{
			private NamePropertyHandler() { }
		
			/// <summary>
			/// Gets the singleton instance of the NameableItem.Name domain property value handler.
			/// </summary>
			public static readonly NamePropertyHandler Instance = new NamePropertyHandler();
		
			/// <summary>
			/// Gets the Id of the NameableItem.Name domain property.
			/// </summary>
			public sealed override global::System.Guid DomainPropertyId
			{
				[global::System.Diagnostics.DebuggerStepThrough]
				get
				{
					return NameDomainPropertyId;
				}
			}
			
			/// <summary>
			/// Gets a strongly-typed value of the property on specified element.
			/// </summary>
			/// <param name="element">Element which owns the property.</param>
			/// <returns>Property value.</returns>
			public override sealed global::System.String GetValue(NameableItem element)
			{
				if (element == null) throw new global::System.ArgumentNullException("element");
				return element.namePropertyStorage;
			}
		
			/// <summary>
			/// Sets property value on an element.
			/// </summary>
			/// <param name="element">Element which owns the property.</param>
			/// <param name="newValue">New property value.</param>
			public override sealed void SetValue(NameableItem element, global::System.String newValue)
			{
				if (element == null) throw new global::System.ArgumentNullException("element");
		
				global::System.String oldValue = GetValue(element);
				if (newValue != oldValue)
				{
					ValueChanging(element, oldValue, newValue);
					element.namePropertyStorage = newValue;
					ValueChanged(element, oldValue, newValue);
				}
			}
		}
		
		#endregion
	}
}
namespace Microsoft.Data.Entity.Design.EntityDesigner.ViewModel
{
	/// <summary>
	/// DomainClass EntityDesignerViewModel
	/// </summary>
	[DslDesign::DisplayNameResource("Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityDesignerViewModel.DisplayName", typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel), "Microsoft.Data.Entity.Design.EntityDesigner.GeneratedCode.DomainModelResx")]
	[DslDesign::DescriptionResource("Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityDesignerViewModel.Description", typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel), "Microsoft.Data.Entity.Design.EntityDesigner.GeneratedCode.DomainModelResx")]
	[DslModeling::DomainModelOwner(typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel))]
	[DslModeling::DomainObjectId("a460641b-c69f-4e0f-8da2-fe3a96845fac")]
	internal partial class EntityDesignerViewModel : DslModeling::ModelElement
	{
		#region Constructors, domain class Id
	
		/// <summary>
		/// EntityDesignerViewModel domain class Id.
		/// </summary>
		public static readonly new global::System.Guid DomainClassId = new global::System.Guid(0xa460641b, 0xc69f, 0x4e0f, 0x8d, 0xa2, 0xfe, 0x3a, 0x96, 0x84, 0x5f, 0xac);
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="store">Store where new element is to be created.</param>
		/// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
		public EntityDesignerViewModel(DslModeling::Store store, params DslModeling::PropertyAssignment[] propertyAssignments)
			: this(store != null ? store.DefaultPartitionForClass(DomainClassId) : null, propertyAssignments)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="partition">Partition where new element is to be created.</param>
		/// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
		public EntityDesignerViewModel(DslModeling::Partition partition, params DslModeling::PropertyAssignment[] propertyAssignments)
			: base(partition, propertyAssignments)
		{
		}
		#endregion
		#region Namespace domain property code
		
		/// <summary>
		/// Namespace domain property Id.
		/// </summary>
		public static readonly global::System.Guid NamespaceDomainPropertyId = new global::System.Guid(0x4c4e5500, 0x1eae, 0x47ee, 0x80, 0xff, 0x10, 0x45, 0xf1, 0x38, 0x34, 0xd7);
		
		/// <summary>
		/// Storage for Namespace
		/// </summary>
		private global::System.String namespacePropertyStorage = string.Empty;
		
		/// <summary>
		/// Gets or sets the value of Namespace domain property.
		/// Description for
		/// Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityDesignerViewModel.Namespace
		/// </summary>
		[DslDesign::DisplayNameResource("Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityDesignerViewModel/Namespace.DisplayName", typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel), "Microsoft.Data.Entity.Design.EntityDesigner.GeneratedCode.DomainModelResx")]
		[DslDesign::DescriptionResource("Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityDesignerViewModel/Namespace.Description", typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel), "Microsoft.Data.Entity.Design.EntityDesigner.GeneratedCode.DomainModelResx")]
		[global::System.ComponentModel.Browsable(false)]
		[global::System.ComponentModel.ReadOnly(true)]
		[DslModeling::DomainObjectId("4c4e5500-1eae-47ee-80ff-1045f13834d7")]
		public global::System.String Namespace
		{
			[global::System.Diagnostics.DebuggerStepThrough]
			get
			{
				return namespacePropertyStorage;
			}
			[global::System.Diagnostics.DebuggerStepThrough]
			set
			{
				NamespacePropertyHandler.Instance.SetValue(this, value);
			}
		}
		/// <summary>
		/// Value handler for the EntityDesignerViewModel.Namespace domain property.
		/// </summary>
		internal sealed partial class NamespacePropertyHandler : DslModeling::DomainPropertyValueHandler<EntityDesignerViewModel, global::System.String>
		{
			private NamespacePropertyHandler() { }
		
			/// <summary>
			/// Gets the singleton instance of the EntityDesignerViewModel.Namespace domain property value handler.
			/// </summary>
			public static readonly NamespacePropertyHandler Instance = new NamespacePropertyHandler();
		
			/// <summary>
			/// Gets the Id of the EntityDesignerViewModel.Namespace domain property.
			/// </summary>
			public sealed override global::System.Guid DomainPropertyId
			{
				[global::System.Diagnostics.DebuggerStepThrough]
				get
				{
					return NamespaceDomainPropertyId;
				}
			}
			
			/// <summary>
			/// Gets a strongly-typed value of the property on specified element.
			/// </summary>
			/// <param name="element">Element which owns the property.</param>
			/// <returns>Property value.</returns>
			public override sealed global::System.String GetValue(EntityDesignerViewModel element)
			{
				if (element == null) throw new global::System.ArgumentNullException("element");
				return element.namespacePropertyStorage;
			}
		
			/// <summary>
			/// Sets property value on an element.
			/// </summary>
			/// <param name="element">Element which owns the property.</param>
			/// <param name="newValue">New property value.</param>
			public override sealed void SetValue(EntityDesignerViewModel element, global::System.String newValue)
			{
				if (element == null) throw new global::System.ArgumentNullException("element");
		
				global::System.String oldValue = GetValue(element);
				if (newValue != oldValue)
				{
					ValueChanging(element, oldValue, newValue);
					element.namespacePropertyStorage = newValue;
					ValueChanged(element, oldValue, newValue);
				}
			}
		}
		
		#endregion
		#region EntityTypes opposite domain role accessor
		
		/// <summary>
		/// Gets a list of EntityTypes.
		/// Description for
		/// Microsoft.Data.Entity.Design.EntityDesigner.EntityDesignerViewModelHasEntityTypes.EntityDesignerViewModel
		/// </summary>
		public virtual DslModeling::LinkedElementCollection<EntityType> EntityTypes
		{
			[global::System.Diagnostics.DebuggerStepThrough]
			get
			{
				return GetRoleCollection<DslModeling::LinkedElementCollection<EntityType>, EntityType>(global::Microsoft.Data.Entity.Design.EntityDesigner.EntityDesignerViewModelHasEntityTypes.EntityDesignerViewModelDomainRoleId);
			}
		}
		#endregion
		#region ElementGroupPrototype Merge methods
		/// <summary>
		/// Returns a value indicating whether the source element represented by the
		/// specified root ProtoElement can be added to this element.
		/// </summary>
		/// <param name="rootElement">
		/// The root ProtoElement representing a source element.  This can be null, 
		/// in which case the ElementGroupPrototype does not contain an ProtoElements
		/// and the code should inspect the ElementGroupPrototype context information.
		/// </param>
		/// <param name="elementGroupPrototype">The ElementGroupPrototype that contains the root ProtoElement.</param>
		/// <returns>true if the source element represented by the ProtoElement can be added to this target element.</returns>
		protected override bool CanMerge(DslModeling::ProtoElementBase rootElement, DslModeling::ElementGroupPrototype elementGroupPrototype)
		{
			if ( elementGroupPrototype == null ) throw new global::System.ArgumentNullException("elementGroupPrototype");
			
			if (rootElement != null)
			{
				DslModeling::DomainClassInfo rootElementDomainInfo = this.Partition.DomainDataDirectory.GetDomainClass(rootElement.DomainClassId);
				
				if (rootElementDomainInfo.IsDerivedFrom(global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityType.DomainClassId)) 
				{
					return true;
				}
			}
			return base.CanMerge(rootElement, elementGroupPrototype);
		}
		
		/// <summary>
		/// Called by the Merge process to create a relationship between 
		/// this target element and the specified source element. 
		/// Typically, a parent-child relationship is established
		/// between the target element (the parent) and the source element 
		/// (the child), but any relationship can be established.
		/// </summary>
		/// <param name="sourceElement">The element that is to be related to this model element.</param>
		/// <param name="elementGroup">The group of source ModelElements that have been rehydrated into the target store.</param>
		/// <remarks>
		/// This method is overriden to create the relationship between the target element and the specified source element.
		/// The base method does nothing.
		/// </remarks>
		protected override void MergeRelate(DslModeling::ModelElement sourceElement, DslModeling::ElementGroup elementGroup)
		{
			// In general, sourceElement is allowed to be null, meaning that the elementGroup must be parsed for special cases.
			// However this is not supported in generated code.  Use double-deriving on this class and then override MergeRelate completely if you 
			// need to support this case.
			if ( sourceElement == null ) throw new global::System.ArgumentNullException("sourceElement");
		
				
			global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityType sourceEntityType1 = sourceElement as global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityType;
			if (sourceEntityType1 != null)
			{
				// Create link for path Microsoft.Data.Entity.Design.EntityDesigner.EntityDesignerViewModelHasEntityTypes.EntityTypes
				this.EntityTypes.Add(sourceEntityType1);

				return;
			}
			// Fall through to base class if this class hasn't handled the merge.
			base.MergeRelate(sourceElement, elementGroup);
		}
		
		/// <summary>
		/// Performs operation opposite to MergeRelate - i.e. disconnects a given
		/// element from the current one (removes links created by MergeRelate).
		/// </summary>
		/// <param name="sourceElement">Element to be unmerged/disconnected.</param>
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
		protected override void MergeDisconnect(DslModeling::ModelElement sourceElement)
		{
			if (sourceElement == null) throw new global::System.ArgumentNullException("sourceElement");
				
			global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityType sourceEntityType1 = sourceElement as global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityType;
			if (sourceEntityType1 != null)
			{
				// Delete link for path Microsoft.Data.Entity.Design.EntityDesigner.EntityDesignerViewModelHasEntityTypes.EntityTypes
				
				foreach (DslModeling::ElementLink link in global::Microsoft.Data.Entity.Design.EntityDesigner.EntityDesignerViewModelHasEntityTypes.GetLinks((global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityDesignerViewModel)this, sourceEntityType1))
				{
					// Delete the link, but without possible delete propagation to the element since it's moving to a new location.
					link.Delete(global::Microsoft.Data.Entity.Design.EntityDesigner.EntityDesignerViewModelHasEntityTypes.EntityDesignerViewModelDomainRoleId, global::Microsoft.Data.Entity.Design.EntityDesigner.EntityDesignerViewModelHasEntityTypes.EntityTypeDomainRoleId);
				}

				return;
			}
			// Fall through to base class if this class hasn't handled the unmerge.
			base.MergeDisconnect(sourceElement);
		}
		#endregion
	}
}
namespace Microsoft.Data.Entity.Design.EntityDesigner.ViewModel
{
	/// <summary>
	/// Double-derived base class for DomainClass EntityType
	/// </summary>
	[DslDesign::DisplayNameResource("Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityType.DisplayName", typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel), "Microsoft.Data.Entity.Design.EntityDesigner.GeneratedCode.DomainModelResx")]
	[DslDesign::DescriptionResource("Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityType.Description", typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel), "Microsoft.Data.Entity.Design.EntityDesigner.GeneratedCode.DomainModelResx")]
	[DslModeling::DomainModelOwner(typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel))]
	[DslModeling::DomainObjectId("4b6e96fa-a795-440e-b657-dc1828d259c9")]
	internal abstract partial class EntityTypeBase : NameableItem
	{
		#region Constructors, domain class Id
	
		/// <summary>
		/// EntityType domain class Id.
		/// </summary>
		public static readonly new global::System.Guid DomainClassId = new global::System.Guid(0x4b6e96fa, 0xa795, 0x440e, 0xb6, 0x57, 0xdc, 0x18, 0x28, 0xd2, 0x59, 0xc9);
		/// <summary>
		/// Constructor.
		/// </summary>
		/// <param name="partition">Partition where new element is to be created.</param>
		/// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
		protected EntityTypeBase(DslModeling::Partition partition, DslModeling::PropertyAssignment[] propertyAssignments)
			: base(partition, propertyAssignments)
		{
		}
		#endregion
		#region BaseTypeName domain property code
		
		/// <summary>
		/// BaseTypeName domain property Id.
		/// </summary>
		public static readonly global::System.Guid BaseTypeNameDomainPropertyId = new global::System.Guid(0xad7054fd, 0x2b49, 0x4f29, 0x9a, 0x4e, 0x02, 0x63, 0xfd, 0xd5, 0xd7, 0x11);
		
		/// <summary>
		/// Gets or sets the value of BaseTypeName domain property.
		/// Computed name of the base type. Empty if no base type
		/// </summary>
		[DslDesign::DisplayNameResource("Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityType/BaseTypeName.DisplayName", typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel), "Microsoft.Data.Entity.Design.EntityDesigner.GeneratedCode.DomainModelResx")]
		[DslDesign::DescriptionResource("Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityType/BaseTypeName.Description", typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel), "Microsoft.Data.Entity.Design.EntityDesigner.GeneratedCode.DomainModelResx")]
		[global::System.ComponentModel.Browsable(false)]
		[global::System.ComponentModel.ReadOnly(true)]
		[DslModeling::DomainProperty(Kind = DslModeling::DomainPropertyKind.Calculated)]
		[DslModeling::DomainObjectId("ad7054fd-2b49-4f29-9a4e-0263fdd5d711")]
		public global::System.String BaseTypeName
		{
			[global::System.Diagnostics.DebuggerStepThrough]
			get
			{
				return BaseTypeNamePropertyHandler.Instance.GetValue(this);
			}
		}
		/// <summary>
		/// Value handler for the EntityType.BaseTypeName domain property.
		/// </summary>
		internal sealed partial class BaseTypeNamePropertyHandler : DslModeling::CalculatedPropertyValueHandler<EntityTypeBase, global::System.String>
		{
			private BaseTypeNamePropertyHandler() { }
		
			/// <summary>
			/// Gets the singleton instance of the EntityType.BaseTypeName domain property value handler.
			/// </summary>
			public static readonly BaseTypeNamePropertyHandler Instance = new BaseTypeNamePropertyHandler();
		
			/// <summary>
			/// Gets the Id of the EntityType.BaseTypeName domain property.
			/// </summary>
			public sealed override global::System.Guid DomainPropertyId
			{
				[global::System.Diagnostics.DebuggerStepThrough]
				get
				{
					return BaseTypeNameDomainPropertyId;
				}
			}
			
			/// <summary>
			/// Gets a strongly-typed value of the property on specified element.
			/// </summary>
			/// <param name="element">Element which owns the property.</param>
			/// <returns>Property value.</returns>
			public override sealed global::System.String GetValue(EntityTypeBase element)
			{
				if (element == null) throw new global::System.ArgumentNullException("element");
				// There is no storage for BaseTypeName because its Kind is
				// set to Calculated. Please provide the GetBaseTypeNameValue()
				// method on the domain class.
				return element.GetBaseTypeNameValue();
			}
		
		}
		
		#endregion
		#region HasBaseType domain property code
		
		/// <summary>
		/// HasBaseType domain property Id.
		/// </summary>
		public static readonly global::System.Guid HasBaseTypeDomainPropertyId = new global::System.Guid(0x3838f73b, 0x98b7, 0x47be, 0x93, 0x6d, 0xd1, 0x1f, 0x2a, 0xba, 0x99, 0x7a);
		
		/// <summary>
		/// Gets or sets the value of HasBaseType domain property.
		/// Indicates if this has a base type
		/// </summary>
		[DslDesign::DisplayNameResource("Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityType/HasBaseType.DisplayName", typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel), "Microsoft.Data.Entity.Design.EntityDesigner.GeneratedCode.DomainModelResx")]
		[DslDesign::DescriptionResource("Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityType/HasBaseType.Description", typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel), "Microsoft.Data.Entity.Design.EntityDesigner.GeneratedCode.DomainModelResx")]
		[global::System.ComponentModel.Browsable(false)]
		[global::System.ComponentModel.ReadOnly(true)]
		[DslModeling::DomainProperty(Kind = DslModeling::DomainPropertyKind.Calculated)]
		[DslModeling::DomainObjectId("3838f73b-98b7-47be-936d-d11f2aba997a")]
		public global::System.Boolean HasBaseType
		{
			[global::System.Diagnostics.DebuggerStepThrough]
			get
			{
				return HasBaseTypePropertyHandler.Instance.GetValue(this);
			}
		}
		/// <summary>
		/// Value handler for the EntityType.HasBaseType domain property.
		/// </summary>
		internal sealed partial class HasBaseTypePropertyHandler : DslModeling::CalculatedPropertyValueHandler<EntityTypeBase, global::System.Boolean>
		{
			private HasBaseTypePropertyHandler() { }
		
			/// <summary>
			/// Gets the singleton instance of the EntityType.HasBaseType domain property value handler.
			/// </summary>
			public static readonly HasBaseTypePropertyHandler Instance = new HasBaseTypePropertyHandler();
		
			/// <summary>
			/// Gets the Id of the EntityType.HasBaseType domain property.
			/// </summary>
			public sealed override global::System.Guid DomainPropertyId
			{
				[global::System.Diagnostics.DebuggerStepThrough]
				get
				{
					return HasBaseTypeDomainPropertyId;
				}
			}
			
			/// <summary>
			/// Gets a strongly-typed value of the property on specified element.
			/// </summary>
			/// <param name="element">Element which owns the property.</param>
			/// <returns>Property value.</returns>
			public override sealed global::System.Boolean GetValue(EntityTypeBase element)
			{
				if (element == null) throw new global::System.ArgumentNullException("element");
				// There is no storage for HasBaseType because its Kind is
				// set to Calculated. Please provide the GetHasBaseTypeValue()
				// method on the domain class.
				return element.GetHasBaseTypeValue();
			}
		
		}
		
		#endregion
		#region Properties opposite domain role accessor
		
		/// <summary>
		/// Gets a list of Properties.
		/// Description for
		/// Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityTypeHasProperties.EntityType
		/// </summary>
		public virtual DslModeling::LinkedElementCollection<Property> Properties
		{
			[global::System.Diagnostics.DebuggerStepThrough]
			get
			{
				return GetRoleCollection<DslModeling::LinkedElementCollection<Property>, Property>(global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityTypeHasProperties.EntityTypeDomainRoleId);
			}
		}
		#endregion
		#region EntityDesignerViewModel opposite domain role accessor
		/// <summary>
		/// Gets or sets EntityDesignerViewModel.
		/// Description for
		/// Microsoft.Data.Entity.Design.EntityDesigner.EntityDesignerViewModelHasEntityTypes.EntityType
		/// </summary>
		internal virtual EntityDesignerViewModel EntityDesignerViewModel
		{
			[global::System.Diagnostics.DebuggerStepThrough]
			get
			{
				return DslModeling::DomainRoleInfo.GetLinkedElement(this, global::Microsoft.Data.Entity.Design.EntityDesigner.EntityDesignerViewModelHasEntityTypes.EntityTypeDomainRoleId) as EntityDesignerViewModel;
			}
			[global::System.Diagnostics.DebuggerStepThrough]
			set
			{
				DslModeling::DomainRoleInfo.SetLinkedElement(this, global::Microsoft.Data.Entity.Design.EntityDesigner.EntityDesignerViewModelHasEntityTypes.EntityTypeDomainRoleId, value);
			}
		}
		#endregion
		#region AssociationTargets opposite domain role accessor
		
		/// <summary>
		/// Gets a list of AssociationTargets.
		/// Description for
		/// Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.Association.SourceEntityType
		/// </summary>
		public virtual DslModeling::LinkedElementCollection<EntityType> AssociationTargets
		{
			[global::System.Diagnostics.DebuggerStepThrough]
			get
			{
				return GetRoleCollection<DslModeling::LinkedElementCollection<EntityType>, EntityType>(global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.Association.SourceEntityTypeDomainRoleId);
			}
		}
		#endregion
		#region AssociationSources opposite domain role accessor
		
		/// <summary>
		/// Gets a list of AssociationSources.
		/// Description for
		/// Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.Association.TargetEntityType
		/// </summary>
		public virtual DslModeling::LinkedElementCollection<EntityType> AssociationSources
		{
			[global::System.Diagnostics.DebuggerStepThrough]
			get
			{
				return GetRoleCollection<DslModeling::LinkedElementCollection<EntityType>, EntityType>(global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.Association.TargetEntityTypeDomainRoleId);
			}
		}
		#endregion
		#region NavigationProperties opposite domain role accessor
		
		/// <summary>
		/// Gets a list of NavigationProperties.
		/// Description for
		/// Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityTypeHasNavigationProperties.EntityType
		/// </summary>
		public virtual DslModeling::LinkedElementCollection<NavigationProperty> NavigationProperties
		{
			[global::System.Diagnostics.DebuggerStepThrough]
			get
			{
				return GetRoleCollection<DslModeling::LinkedElementCollection<NavigationProperty>, NavigationProperty>(global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityTypeHasNavigationProperties.EntityTypeDomainRoleId);
			}
		}
		#endregion
		#region DerivedTypes opposite domain role accessor
		
		/// <summary>
		/// Gets a list of DerivedTypes.
		/// Description for
		/// Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.Inheritance.SourceEntityType
		/// </summary>
		public virtual DslModeling::LinkedElementCollection<EntityType> DerivedTypes
		{
			[global::System.Diagnostics.DebuggerStepThrough]
			get
			{
				return GetRoleCollection<DslModeling::LinkedElementCollection<EntityType>, EntityType>(global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.Inheritance.SourceEntityTypeDomainRoleId);
			}
		}
		#endregion
		#region BaseType opposite domain role accessor
		/// <summary>
		/// Gets or sets BaseType.
		/// Description for
		/// Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.Inheritance.TargetEntityType
		/// </summary>
		internal virtual EntityType BaseType
		{
			[global::System.Diagnostics.DebuggerStepThrough]
			get
			{
				return DslModeling::DomainRoleInfo.GetLinkedElement(this, global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.Inheritance.TargetEntityTypeDomainRoleId) as EntityType;
			}
			[global::System.Diagnostics.DebuggerStepThrough]
			set
			{
				DslModeling::DomainRoleInfo.SetLinkedElement(this, global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.Inheritance.TargetEntityTypeDomainRoleId, value);
			}
		}
		#endregion
		#region ElementGroupPrototype Merge methods
		/// <summary>
		/// Returns a value indicating whether the source element represented by the
		/// specified root ProtoElement can be added to this element.
		/// </summary>
		/// <param name="rootElement">
		/// The root ProtoElement representing a source element.  This can be null, 
		/// in which case the ElementGroupPrototype does not contain an ProtoElements
		/// and the code should inspect the ElementGroupPrototype context information.
		/// </param>
		/// <param name="elementGroupPrototype">The ElementGroupPrototype that contains the root ProtoElement.</param>
		/// <returns>true if the source element represented by the ProtoElement can be added to this target element.</returns>
		protected override bool CanMerge(DslModeling::ProtoElementBase rootElement, DslModeling::ElementGroupPrototype elementGroupPrototype)
		{
			if ( elementGroupPrototype == null ) throw new global::System.ArgumentNullException("elementGroupPrototype");
			
			if (rootElement != null)
			{
				DslModeling::DomainClassInfo rootElementDomainInfo = this.Partition.DomainDataDirectory.GetDomainClass(rootElement.DomainClassId);
				
				if (rootElementDomainInfo.IsDerivedFrom(global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.NavigationProperty.DomainClassId)) 
				{
					return true;
				}
				
				if (rootElementDomainInfo.IsDerivedFrom(global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.Property.DomainClassId)) 
				{
					return true;
				}
			}
			return base.CanMerge(rootElement, elementGroupPrototype);
		}
		
		/// <summary>
		/// Called by the Merge process to create a relationship between 
		/// this target element and the specified source element. 
		/// Typically, a parent-child relationship is established
		/// between the target element (the parent) and the source element 
		/// (the child), but any relationship can be established.
		/// </summary>
		/// <param name="sourceElement">The element that is to be related to this model element.</param>
		/// <param name="elementGroup">The group of source ModelElements that have been rehydrated into the target store.</param>
		/// <remarks>
		/// This method is overriden to create the relationship between the target element and the specified source element.
		/// The base method does nothing.
		/// </remarks>
		protected override void MergeRelate(DslModeling::ModelElement sourceElement, DslModeling::ElementGroup elementGroup)
		{
			// In general, sourceElement is allowed to be null, meaning that the elementGroup must be parsed for special cases.
			// However this is not supported in generated code.  Use double-deriving on this class and then override MergeRelate completely if you 
			// need to support this case.
			if ( sourceElement == null ) throw new global::System.ArgumentNullException("sourceElement");
		
				
			global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.NavigationProperty sourceNavigationProperty1 = sourceElement as global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.NavigationProperty;
			if (sourceNavigationProperty1 != null)
			{
				// Create link for path EntityTypeHasNavigationProperties.NavigationProperties
				this.NavigationProperties.Add(sourceNavigationProperty1);

				return;
			}
				
			global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.Property sourceProperty2 = sourceElement as global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.Property;
			if (sourceProperty2 != null)
			{
				// Create link for path EntityTypeHasProperties.Properties
				this.Properties.Add(sourceProperty2);

				return;
			}
			// Fall through to base class if this class hasn't handled the merge.
			base.MergeRelate(sourceElement, elementGroup);
		}
		
		/// <summary>
		/// Performs operation opposite to MergeRelate - i.e. disconnects a given
		/// element from the current one (removes links created by MergeRelate).
		/// </summary>
		/// <param name="sourceElement">Element to be unmerged/disconnected.</param>
		[global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
		protected override void MergeDisconnect(DslModeling::ModelElement sourceElement)
		{
			if (sourceElement == null) throw new global::System.ArgumentNullException("sourceElement");
				
			global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.NavigationProperty sourceNavigationProperty1 = sourceElement as global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.NavigationProperty;
			if (sourceNavigationProperty1 != null)
			{
				// Delete link for path EntityTypeHasNavigationProperties.NavigationProperties
				
				foreach (DslModeling::ElementLink link in global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityTypeHasNavigationProperties.GetLinks((global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityType)this, sourceNavigationProperty1))
				{
					// Delete the link, but without possible delete propagation to the element since it's moving to a new location.
					link.Delete(global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityTypeHasNavigationProperties.EntityTypeDomainRoleId, global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityTypeHasNavigationProperties.NavigationPropertyDomainRoleId);
				}

				return;
			}
				
			global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.Property sourceProperty2 = sourceElement as global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.Property;
			if (sourceProperty2 != null)
			{
				// Delete link for path EntityTypeHasProperties.Properties
				
				foreach (DslModeling::ElementLink link in global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityTypeHasProperties.GetLinks((global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityType)this, sourceProperty2))
				{
					// Delete the link, but without possible delete propagation to the element since it's moving to a new location.
					link.Delete(global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityTypeHasProperties.EntityTypeDomainRoleId, global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityTypeHasProperties.PropertyDomainRoleId);
				}

				return;
			}
			// Fall through to base class if this class hasn't handled the unmerge.
			base.MergeDisconnect(sourceElement);
		}
		#endregion
	}
	/// <summary>
	/// DomainClass EntityType
	/// </summary>
			
	internal partial class EntityType : EntityTypeBase
	{
		#region Constructors
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="store">Store where new element is to be created.</param>
		/// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
		public EntityType(DslModeling::Store store, params DslModeling::PropertyAssignment[] propertyAssignments)
			: this(store != null ? store.DefaultPartitionForClass(DomainClassId) : null, propertyAssignments)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="partition">Partition where new element is to be created.</param>
		/// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
		public EntityType(DslModeling::Partition partition, params DslModeling::PropertyAssignment[] propertyAssignments)
			: base(partition, propertyAssignments)
		{
		}
		#endregion
	}
}
namespace Microsoft.Data.Entity.Design.EntityDesigner.ViewModel
{
	/// <summary>
	/// DomainClass Property
	/// </summary>
	[DslDesign::DisplayNameResource("Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.Property.DisplayName", typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel), "Microsoft.Data.Entity.Design.EntityDesigner.GeneratedCode.DomainModelResx")]
	[DslDesign::DescriptionResource("Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.Property.Description", typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel), "Microsoft.Data.Entity.Design.EntityDesigner.GeneratedCode.DomainModelResx")]
	[DslModeling::DomainModelOwner(typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel))]
	[DslModeling::DomainObjectId("b88c8fdf-39e9-42fc-9ee9-43d55223619a")]
	internal abstract partial class Property : PropertyBase
	{
		#region Constructors, domain class Id
	
		/// <summary>
		/// Property domain class Id.
		/// </summary>
		public static readonly new global::System.Guid DomainClassId = new global::System.Guid(0xb88c8fdf, 0x39e9, 0x42fc, 0x9e, 0xe9, 0x43, 0xd5, 0x52, 0x23, 0x61, 0x9a);
		/// <summary>
		/// Constructor.
		/// </summary>
		/// <param name="partition">Partition where new element is to be created.</param>
		/// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
		protected Property(DslModeling::Partition partition, DslModeling::PropertyAssignment[] propertyAssignments)
			: base(partition, propertyAssignments)
		{
		}
		#endregion
		#region Type domain property code
		
		/// <summary>
		/// Type domain property Id.
		/// </summary>
		public static readonly global::System.Guid TypeDomainPropertyId = new global::System.Guid(0x81852ed4, 0x2a73, 0x4509, 0x98, 0x03, 0x24, 0x4a, 0x7a, 0xbd, 0x6b, 0xd0);
		
		/// <summary>
		/// Storage for Type
		/// </summary>
		private global::System.String typePropertyStorage = "String";
		
		/// <summary>
		/// Gets or sets the value of Type domain property.
		/// Specifies the EDM type of this property. The property window only displays
		/// facets specific to this type.
		/// </summary>
		[DslDesign::DisplayNameResource("Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.Property/Type.DisplayName", typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel), "Microsoft.Data.Entity.Design.EntityDesigner.GeneratedCode.DomainModelResx")]
		[DslDesign::DescriptionResource("Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.Property/Type.Description", typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel), "Microsoft.Data.Entity.Design.EntityDesigner.GeneratedCode.DomainModelResx")]
		[global::System.ComponentModel.DefaultValue("String")]
		[global::System.ComponentModel.Browsable(false)]
		[global::System.ComponentModel.ReadOnly(true)]
		[DslModeling::DomainObjectId("81852ed4-2a73-4509-9803-244a7abd6bd0")]
		public global::System.String Type
		{
			[global::System.Diagnostics.DebuggerStepThrough]
			get
			{
				return typePropertyStorage;
			}
			[global::System.Diagnostics.DebuggerStepThrough]
			set
			{
				TypePropertyHandler.Instance.SetValue(this, value);
			}
		}
		/// <summary>
		/// Value handler for the Property.Type domain property.
		/// </summary>
		internal sealed partial class TypePropertyHandler : DslModeling::DomainPropertyValueHandler<Property, global::System.String>
		{
			private TypePropertyHandler() { }
		
			/// <summary>
			/// Gets the singleton instance of the Property.Type domain property value handler.
			/// </summary>
			public static readonly TypePropertyHandler Instance = new TypePropertyHandler();
		
			/// <summary>
			/// Gets the Id of the Property.Type domain property.
			/// </summary>
			public sealed override global::System.Guid DomainPropertyId
			{
				[global::System.Diagnostics.DebuggerStepThrough]
				get
				{
					return TypeDomainPropertyId;
				}
			}
			
			/// <summary>
			/// Gets a strongly-typed value of the property on specified element.
			/// </summary>
			/// <param name="element">Element which owns the property.</param>
			/// <returns>Property value.</returns>
			public override sealed global::System.String GetValue(Property element)
			{
				if (element == null) throw new global::System.ArgumentNullException("element");
				return element.typePropertyStorage;
			}
		
			/// <summary>
			/// Sets property value on an element.
			/// </summary>
			/// <param name="element">Element which owns the property.</param>
			/// <param name="newValue">New property value.</param>
			public override sealed void SetValue(Property element, global::System.String newValue)
			{
				if (element == null) throw new global::System.ArgumentNullException("element");
		
				global::System.String oldValue = GetValue(element);
				if (newValue != oldValue)
				{
					ValueChanging(element, oldValue, newValue);
					element.typePropertyStorage = newValue;
					ValueChanged(element, oldValue, newValue);
				}
			}
		}
		
		#endregion
		#region EntityType opposite domain role accessor
		/// <summary>
		/// Gets or sets EntityType.
		/// Description for
		/// Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityTypeHasProperties.Property
		/// </summary>
		internal virtual EntityType EntityType
		{
			[global::System.Diagnostics.DebuggerStepThrough]
			get
			{
				return DslModeling::DomainRoleInfo.GetLinkedElement(this, global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityTypeHasProperties.PropertyDomainRoleId) as EntityType;
			}
			[global::System.Diagnostics.DebuggerStepThrough]
			set
			{
				DslModeling::DomainRoleInfo.SetLinkedElement(this, global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityTypeHasProperties.PropertyDomainRoleId, value);
			}
		}
		#endregion
	}
}
namespace Microsoft.Data.Entity.Design.EntityDesigner.ViewModel
{
	/// <summary>
	/// DomainClass PropertyBase
	/// </summary>
	[DslDesign::DisplayNameResource("Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.PropertyBase.DisplayName", typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel), "Microsoft.Data.Entity.Design.EntityDesigner.GeneratedCode.DomainModelResx")]
	[DslDesign::DescriptionResource("Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.PropertyBase.Description", typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel), "Microsoft.Data.Entity.Design.EntityDesigner.GeneratedCode.DomainModelResx")]
	[DslModeling::DomainModelOwner(typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel))]
	[DslModeling::DomainObjectId("57498f30-3645-4c7a-8e7a-f501e83da1b5")]
	internal abstract partial class PropertyBase : NameableItem
	{
		#region Constructors, domain class Id
	
		/// <summary>
		/// PropertyBase domain class Id.
		/// </summary>
		public static readonly new global::System.Guid DomainClassId = new global::System.Guid(0x57498f30, 0x3645, 0x4c7a, 0x8e, 0x7a, 0xf5, 0x01, 0xe8, 0x3d, 0xa1, 0xb5);
		/// <summary>
		/// Constructor.
		/// </summary>
		/// <param name="partition">Partition where new element is to be created.</param>
		/// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
		protected PropertyBase(DslModeling::Partition partition, DslModeling::PropertyAssignment[] propertyAssignments)
			: base(partition, propertyAssignments)
		{
		}
		#endregion
	}
}
namespace Microsoft.Data.Entity.Design.EntityDesigner.ViewModel
{
	/// <summary>
	/// DomainClass NavigationProperty
	/// </summary>
	[DslDesign::DisplayNameResource("Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.NavigationProperty.DisplayName", typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel), "Microsoft.Data.Entity.Design.EntityDesigner.GeneratedCode.DomainModelResx")]
	[DslDesign::DescriptionResource("Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.NavigationProperty.Description", typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel), "Microsoft.Data.Entity.Design.EntityDesigner.GeneratedCode.DomainModelResx")]
	[DslModeling::DomainModelOwner(typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel))]
	[DslModeling::DomainObjectId("1eb61091-eaa5-4256-a931-b71c42b85a0c")]
	internal partial class NavigationProperty : PropertyBase
	{
		#region Constructors, domain class Id
	
		/// <summary>
		/// NavigationProperty domain class Id.
		/// </summary>
		public static readonly new global::System.Guid DomainClassId = new global::System.Guid(0x1eb61091, 0xeaa5, 0x4256, 0xa9, 0x31, 0xb7, 0x1c, 0x42, 0xb8, 0x5a, 0x0c);
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="store">Store where new element is to be created.</param>
		/// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
		public NavigationProperty(DslModeling::Store store, params DslModeling::PropertyAssignment[] propertyAssignments)
			: this(store != null ? store.DefaultPartitionForClass(DomainClassId) : null, propertyAssignments)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="partition">Partition where new element is to be created.</param>
		/// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
		public NavigationProperty(DslModeling::Partition partition, params DslModeling::PropertyAssignment[] propertyAssignments)
			: base(partition, propertyAssignments)
		{
		}
		#endregion
		#region EntityType opposite domain role accessor
		/// <summary>
		/// Gets or sets EntityType.
		/// Description for
		/// Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityTypeHasNavigationProperties.NavigationProperty
		/// </summary>
		internal virtual EntityType EntityType
		{
			[global::System.Diagnostics.DebuggerStepThrough]
			get
			{
				return DslModeling::DomainRoleInfo.GetLinkedElement(this, global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityTypeHasNavigationProperties.NavigationPropertyDomainRoleId) as EntityType;
			}
			[global::System.Diagnostics.DebuggerStepThrough]
			set
			{
				DslModeling::DomainRoleInfo.SetLinkedElement(this, global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.EntityTypeHasNavigationProperties.NavigationPropertyDomainRoleId, value);
			}
		}
		#endregion
	}
}
namespace Microsoft.Data.Entity.Design.EntityDesigner.ViewModel
{
	/// <summary>
	/// DomainClass ComplexProperty
	/// </summary>
	[DslDesign::DisplayNameResource("Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.ComplexProperty.DisplayName", typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel), "Microsoft.Data.Entity.Design.EntityDesigner.GeneratedCode.DomainModelResx")]
	[DslDesign::DescriptionResource("Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.ComplexProperty.Description", typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel), "Microsoft.Data.Entity.Design.EntityDesigner.GeneratedCode.DomainModelResx")]
	[DslModeling::DomainModelOwner(typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel))]
	[DslModeling::DomainObjectId("ffb5ef4e-3b9a-4e6f-9c26-67b8f2e1f13d")]
	internal partial class ComplexProperty : Property
	{
		#region Constructors, domain class Id
	
		/// <summary>
		/// ComplexProperty domain class Id.
		/// </summary>
		public static readonly new global::System.Guid DomainClassId = new global::System.Guid(0xffb5ef4e, 0x3b9a, 0x4e6f, 0x9c, 0x26, 0x67, 0xb8, 0xf2, 0xe1, 0xf1, 0x3d);
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="store">Store where new element is to be created.</param>
		/// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
		public ComplexProperty(DslModeling::Store store, params DslModeling::PropertyAssignment[] propertyAssignments)
			: this(store != null ? store.DefaultPartitionForClass(DomainClassId) : null, propertyAssignments)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="partition">Partition where new element is to be created.</param>
		/// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
		public ComplexProperty(DslModeling::Partition partition, params DslModeling::PropertyAssignment[] propertyAssignments)
			: base(partition, propertyAssignments)
		{
		}
		#endregion
	}
}
namespace Microsoft.Data.Entity.Design.EntityDesigner.ViewModel
{
	/// <summary>
	/// DomainClass ScalarProperty
	/// </summary>
	[DslDesign::DisplayNameResource("Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.ScalarProperty.DisplayName", typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel), "Microsoft.Data.Entity.Design.EntityDesigner.GeneratedCode.DomainModelResx")]
	[DslDesign::DescriptionResource("Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.ScalarProperty.Description", typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel), "Microsoft.Data.Entity.Design.EntityDesigner.GeneratedCode.DomainModelResx")]
	[DslModeling::DomainModelOwner(typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel))]
	[DslModeling::DomainObjectId("c4075739-14d5-40af-9cd8-0b3c73dacd4f")]
	internal partial class ScalarProperty : Property
	{
		#region Constructors, domain class Id
	
		/// <summary>
		/// ScalarProperty domain class Id.
		/// </summary>
		public static readonly new global::System.Guid DomainClassId = new global::System.Guid(0xc4075739, 0x14d5, 0x40af, 0x9c, 0xd8, 0x0b, 0x3c, 0x73, 0xda, 0xcd, 0x4f);
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="store">Store where new element is to be created.</param>
		/// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
		public ScalarProperty(DslModeling::Store store, params DslModeling::PropertyAssignment[] propertyAssignments)
			: this(store != null ? store.DefaultPartitionForClass(DomainClassId) : null, propertyAssignments)
		{
		}
		
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="partition">Partition where new element is to be created.</param>
		/// <param name="propertyAssignments">List of domain property id/value pairs to set once the element is created.</param>
		public ScalarProperty(DslModeling::Partition partition, params DslModeling::PropertyAssignment[] propertyAssignments)
			: base(partition, propertyAssignments)
		{
		}
		#endregion
		#region EntityKey domain property code
		
		/// <summary>
		/// EntityKey domain property Id.
		/// </summary>
		public static readonly global::System.Guid EntityKeyDomainPropertyId = new global::System.Guid(0xa07effa9, 0x80a6, 0x452f, 0xaf, 0x52, 0xe4, 0xf3, 0x69, 0xf0, 0x73, 0x5f);
		
		/// <summary>
		/// Storage for EntityKey
		/// </summary>
		private global::System.Boolean entityKeyPropertyStorage;
		
		/// <summary>
		/// Gets or sets the value of EntityKey domain property.
		/// </summary>
		[DslDesign::DisplayNameResource("Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.ScalarProperty/EntityKey.DisplayName", typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel), "Microsoft.Data.Entity.Design.EntityDesigner.GeneratedCode.DomainModelResx")]
		[DslDesign::DescriptionResource("Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.ScalarProperty/EntityKey.Description", typeof(global::Microsoft.Data.Entity.Design.EntityDesigner.MicrosoftDataEntityDesignDomainModel), "Microsoft.Data.Entity.Design.EntityDesigner.GeneratedCode.DomainModelResx")]
		[global::System.ComponentModel.Browsable(false)]
		[global::System.ComponentModel.ReadOnly(true)]
		[DslModeling::DomainObjectId("a07effa9-80a6-452f-af52-e4f369f0735f")]
		public global::System.Boolean EntityKey
		{
			[global::System.Diagnostics.DebuggerStepThrough]
			get
			{
				return entityKeyPropertyStorage;
			}
			[global::System.Diagnostics.DebuggerStepThrough]
			set
			{
				EntityKeyPropertyHandler.Instance.SetValue(this, value);
			}
		}
		/// <summary>
		/// Value handler for the ScalarProperty.EntityKey domain property.
		/// </summary>
		internal sealed partial class EntityKeyPropertyHandler : DslModeling::DomainPropertyValueHandler<ScalarProperty, global::System.Boolean>
		{
			private EntityKeyPropertyHandler() { }
		
			/// <summary>
			/// Gets the singleton instance of the ScalarProperty.EntityKey domain property value handler.
			/// </summary>
			public static readonly EntityKeyPropertyHandler Instance = new EntityKeyPropertyHandler();
		
			/// <summary>
			/// Gets the Id of the ScalarProperty.EntityKey domain property.
			/// </summary>
			public sealed override global::System.Guid DomainPropertyId
			{
				[global::System.Diagnostics.DebuggerStepThrough]
				get
				{
					return EntityKeyDomainPropertyId;
				}
			}
			
			/// <summary>
			/// Gets a strongly-typed value of the property on specified element.
			/// </summary>
			/// <param name="element">Element which owns the property.</param>
			/// <returns>Property value.</returns>
			public override sealed global::System.Boolean GetValue(ScalarProperty element)
			{
				if (element == null) throw new global::System.ArgumentNullException("element");
				return element.entityKeyPropertyStorage;
			}
		
			/// <summary>
			/// Sets property value on an element.
			/// </summary>
			/// <param name="element">Element which owns the property.</param>
			/// <param name="newValue">New property value.</param>
			public override sealed void SetValue(ScalarProperty element, global::System.Boolean newValue)
			{
				if (element == null) throw new global::System.ArgumentNullException("element");
		
				global::System.Boolean oldValue = GetValue(element);
				if (newValue != oldValue)
				{
					ValueChanging(element, oldValue, newValue);
					element.entityKeyPropertyStorage = newValue;
					ValueChanged(element, oldValue, newValue);
				}
			}
		}
		
		#endregion
	}
}
