<?xml version="1.0" encoding="utf-8" ?>
<Recipe Name="CreateBEFromDB" xmlns="http://schemas.microsoft.com/pag/gax-core" xmlns:xi="http://www.w3.org/2001/XInclude" Bound="false">
	<xi:include href="Includes/CommonTypeAliases.xml" xpointer="xmlns(gax=http://schemas.microsoft.com/pag/gax-core) xpointer(/gax:Types)" />
	<Caption>Create data entity from database</Caption>
	<Description>Create data enity from database</Description>
	<HostData>
		<Icon ID="7654" />
		<CommandBar Menu="Project" />
	</HostData>
	<Arguments>
		<!--<xi:include href="Common/CommonArguments.xml" xpointer="xmlns(gax=http://schemas.microsoft.com/pag/gax-core) xpointer(/gax:Arguments/gax:Argument)" />-->
		<Argument Name="DataEntitiesProject" Type="EnvDTE.Project, EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
			<Converter Type="ProjectConverter" />
			<ValueProvider Type="Microsoft.Practices.RecipeFramework.Extensions.ValueProviders.VisualStudio.CurrentProjectProvider, Microsoft.Practices.RecipeFramework.Extensions" />
		</Argument>
		<Argument Name="DataEntityClassNamespace">
			<ValueProvider Type="Evaluator" Expression="$(DataEntitiesProject.Properties.Item('DefaultNamespace').Value.ToString())" />
		</Argument>
		<!--<Argument Name="TablesTreeView" Type="Howest.SchemaDiscovery.UI.Controls.ObjectTree, Howest.SchemaDiscovery.Controls" />-->
		<Argument Name="Tables" Type="System.Collections.ArrayList, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
		<Argument Name="Views" Type="System.Collections.ArrayList, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
		<Argument Name="Entities" Type="System.Collections.ArrayList, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
		<xi:include href="Includes/CommonConnectionStringWizardPages.xml" xpointer="xmlns(gax=http://schemas.microsoft.com/pag/gax-core) xpointer(/gax:Recipe/gax:Arguments/gax:Argument)" />
	</Arguments>
	<GatheringServiceData>
		<Wizard xmlns="http://schemas.microsoft.com/pag/gax-wizards" SchemaVersion="1.0" Help="ms-help://MS.VSCC.v80/MS.VSIPCC.v80/ms.wssf.2006Dec/WSSF/html/10-070-Create_Business_Entities_from_a_Database.htm">
			<Pages>
				<xi:include href="Includes/CommonConnectionStringWizardPages.xml" xpointer="xmlns(gax=http://schemas.microsoft.com/pag/gax-core) xmlns(gaxw=http://schemas.microsoft.com/pag/gax-wizards) xpointer(/gax:Recipe/gax:GatheringServiceData/gaxw:Wizard/gaxw:Pages/gaxw:Page)" />
				<Page Type="Howest.Guidance.DataAccess.CustomWizardPages.EntitiesTablesSelectorCP, Howest.Guidance.DataAccess">
					<Title>Data tables properties</Title>
					<LinkTitle>Specify Tables</LinkTitle>
					<Help>Specify the tables that you want to create the data entities from.</Help>
				</Page>
				<Page Type="Howest.Guidance.DataAccess.CustomWizardPages.EntitiesSelectorCP, Howest.Guidance.DataAccess">
					<Title>Data entities properties</Title>
					<LinkTitle>Customize data entities</LinkTitle>
					<Help>Customize the data entities that you want to create.</Help>
				</Page>
			</Pages>
		</Wizard>
	</GatheringServiceData>
	<Actions>
		<Action Name="GenerateDataEntities" Type="Microsoft.Practices.RecipeFramework.VisualStudio.Library.Templates.TextTemplateAction, Microsoft.Practices.RecipeFramework.VisualStudio.Library" Template="T4\DE\DataEntity.t4">
			<Input Name="Entities" RecipeArgument="Entities" />
			<Input Name="DataEntityClassNamespace" RecipeArgument="DataEntityClassNamespace" />
			<Output Name="Content" />
		</Action>
		<Action Name="AddEntities" Type="Howest.Guidance.DataAccess.Actions.VisualStudio.SplitAndAddItemsFromStringAction, Howest.Guidance.DataAccess" Open="true" Overwrite="true" ShowConfirmation="true">
			<Input Name="Content" ActionOutput="GenerateDataEntities.Content" />
			<Input Name="Project" RecipeArgument="DataEntitiesProject" />
		</Action>
	</Actions>
</Recipe>