首次提交:添加src文件夹代码

This commit is contained in:
2026-02-27 14:02:43 +08:00
commit d330cfbca7
4184 changed files with 5546478 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<entityFramework>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.EntityFramework, Version=8.0.28.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"></provider>
</providers>
</entityFramework>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
<connectionStrings><add name="BakingEntities" connectionString="metadata=res://*/DBMappering.csdl|res://*/DBMappering.ssdl|res://*/DBMappering.msl;provider=MySql.Data.MySqlClient;provider connection string=&quot;server=127.0.0.1;user id=root;persistsecurityinfo=True;database=6098-8&quot;" providerName="System.Data.EntityClient" /></connectionStrings>
</configuration>

View File

@@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
namespace Cowain.Bake.DAL.Converter
{
public class MachineTypeConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value == null)
throw new ArgumentNullException("value can not be null");
if (value is int val)
{
var p = GlobalListData.MachineType.Where(x => x.Type == val).FirstOrDefault();
if (null == p)
{
return null;
}
else
{
return p.Name;
}
}
throw new ArgumentNullException("value type is not int");
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}

View File

@@ -0,0 +1,279 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.props" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{362F196C-7C59-4DFB-9A3E-85F880791312}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Cowain.Bake.Model</RootNamespace>
<AssemblyName>Cowain.Bake.Model</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll</HintPath>
</Reference>
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</Reference>
<Reference Include="Google.Protobuf, Version=3.14.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<HintPath>..\packages\Google.Protobuf.3.14.0\lib\net45\Google.Protobuf.dll</HintPath>
</Reference>
<Reference Include="K4os.Compression.LZ4, Version=1.2.6.0, Culture=neutral, PublicKeyToken=2186fa9121ef231d, processorArchitecture=MSIL">
<HintPath>..\packages\K4os.Compression.LZ4.1.2.6\lib\net46\K4os.Compression.LZ4.dll</HintPath>
</Reference>
<Reference Include="K4os.Compression.LZ4.Streams, Version=1.2.6.0, Culture=neutral, PublicKeyToken=2186fa9121ef231d, processorArchitecture=MSIL">
<HintPath>..\packages\K4os.Compression.LZ4.Streams.1.2.6\lib\net46\K4os.Compression.LZ4.Streams.dll</HintPath>
</Reference>
<Reference Include="K4os.Hash.xxHash, Version=1.0.6.0, Culture=neutral, PublicKeyToken=32cd54395057cec3, processorArchitecture=MSIL">
<HintPath>..\packages\K4os.Hash.xxHash.1.0.6\lib\net46\K4os.Hash.xxHash.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.7.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Xaml.Behaviors, Version=1.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Xaml.Behaviors.Wpf.1.1.31\lib\net45\Microsoft.Xaml.Behaviors.dll</HintPath>
</Reference>
<Reference Include="MySql.Data, Version=8.0.28.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
<HintPath>..\packages\MySql.Data.8.0.28\lib\net452\MySql.Data.dll</HintPath>
</Reference>
<Reference Include="MySql.Data.EntityFramework, Version=8.0.28.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
<HintPath>..\packages\MySql.Data.EntityFramework.8.0.28\lib\net452\MySql.Data.EntityFramework.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="Prism">
<HintPath>..\Libs\Prism.dll</HintPath>
</Reference>
<Reference Include="Prism.Unity.Wpf">
<HintPath>..\Libs\Prism.Unity.Wpf.dll</HintPath>
</Reference>
<Reference Include="Prism.Wpf">
<HintPath>..\Libs\Prism.Wpf.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="System.ComponentModel" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Configuration" />
<Reference Include="System.Configuration.Install" />
<Reference Include="System.Core" />
<Reference Include="System.Management" />
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
</Reference>
<Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Security" />
<Reference Include="System.Text.Encodings.Web, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Text.Encodings.Web.7.0.0\lib\net462\System.Text.Encodings.Web.dll</HintPath>
</Reference>
<Reference Include="System.Text.Json, Version=7.0.0.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Text.Json.7.0.2\lib\net462\System.Text.Json.dll</HintPath>
</Reference>
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
</Reference>
<Reference Include="System.Transactions" />
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
</Reference>
<Reference Include="System.Xaml" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="Ubiety.Dns.Core, Version=2.2.1.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
<HintPath>..\packages\MySql.Data.8.0.28\lib\net452\Ubiety.Dns.Core.dll</HintPath>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="ZstdNet, Version=1.4.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
<HintPath>..\packages\MySql.Data.8.0.28\lib\net452\ZstdNet.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="DBMappering.Context.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>DBMappering.Context.tt</DependentUpon>
</Compile>
<Compile Include="DBMappering.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>DBMappering.tt</DependentUpon>
</Compile>
<Compile Include="DBMappering.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>DBMappering.edmx</DependentUpon>
</Compile>
<Compile Include="Entity\AuthorityEntity.cs" />
<Compile Include="Entity\BatteryInfoEntity.cs" />
<Compile Include="Entity\CavityInfoPalletEntity.cs" />
<Compile Include="Entity\MesDataEntity.cs" />
<Compile Include="Entity\MoveInfoEntity.cs" />
<Compile Include="Entity\OutputEntity.cs" />
<Compile Include="Entity\StationDataEntity.cs" />
<Compile Include="Entity\StorageArea.cs" />
<Compile Include="Entity\TagEntity.cs" />
<Compile Include="Entity\TaskEntity.cs" />
<Compile Include="Entity\UserEntity.cs" />
<Compile Include="Entity\WorkOrderFormulaEntity.cs" />
<Compile Include="Entity\WorkStepEntity.cs" />
<Compile Include="Models\BtnInfoModel.cs" />
<Compile Include="Models\CavityHeaderModel.cs" />
<Compile Include="Models\CCommandType.cs" />
<Compile Include="Models\CavityInfoModel.cs" />
<Compile Include="Models\ExCavityInfoModel.cs" />
<Compile Include="Models\LegendEntry.cs" />
<Compile Include="Models\StoveDataModel.cs" />
<Compile Include="Models\Variable.cs" />
<Compile Include="Models\WaterModel.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="TAlarm.cs">
<DependentUpon>DBMappering.tt</DependentUpon>
</Compile>
<Compile Include="TAlarmContent.cs">
<DependentUpon>DBMappering.tt</DependentUpon>
</Compile>
<Compile Include="TBatteryInfo.cs">
<DependentUpon>DBMappering.tt</DependentUpon>
</Compile>
<Compile Include="TBatteryNG.cs">
<DependentUpon>DBMappering.tt</DependentUpon>
</Compile>
<Compile Include="TCavityInfo.cs">
<DependentUpon>DBMappering.tt</DependentUpon>
</Compile>
<Compile Include="TDeviceConfig.cs">
<DependentUpon>DBMappering.tt</DependentUpon>
</Compile>
<Compile Include="TElectricEnergy.cs">
<DependentUpon>DBMappering.tt</DependentUpon>
</Compile>
<Compile Include="TLog.cs">
<DependentUpon>DBMappering.tt</DependentUpon>
</Compile>
<Compile Include="TMenuInfo.cs">
<DependentUpon>DBMappering.tt</DependentUpon>
</Compile>
<Compile Include="TMesData.cs">
<DependentUpon>DBMappering.tt</DependentUpon>
</Compile>
<Compile Include="TPalletInfo.cs">
<DependentUpon>DBMappering.tt</DependentUpon>
</Compile>
<Compile Include="TPalletInfoHistory.cs">
<DependentUpon>DBMappering.tt</DependentUpon>
</Compile>
<Compile Include="TProcessParameter.cs">
<DependentUpon>DBMappering.tt</DependentUpon>
</Compile>
<Compile Include="TProductionInformation.cs">
<DependentUpon>DBMappering.tt</DependentUpon>
</Compile>
<Compile Include="TRgvAction.cs">
<DependentUpon>DBMappering.tt</DependentUpon>
</Compile>
<Compile Include="TRoleInfo.cs">
<DependentUpon>DBMappering.tt</DependentUpon>
</Compile>
<Compile Include="TStation.cs">
<DependentUpon>DBMappering.tt</DependentUpon>
</Compile>
<Compile Include="TStoveSctualPatrol.cs">
<DependentUpon>DBMappering.tt</DependentUpon>
</Compile>
<Compile Include="TSysSetup.cs">
<DependentUpon>DBMappering.tt</DependentUpon>
</Compile>
<Compile Include="TTagList.cs">
<DependentUpon>DBMappering.tt</DependentUpon>
</Compile>
<Compile Include="TTaskRecord.cs">
<DependentUpon>DBMappering.tt</DependentUpon>
</Compile>
<Compile Include="TTaskStep.cs">
<DependentUpon>DBMappering.tt</DependentUpon>
</Compile>
<Compile Include="TTaskType.cs">
<DependentUpon>DBMappering.tt</DependentUpon>
</Compile>
<Compile Include="TUserManage.cs">
<DependentUpon>DBMappering.tt</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<EntityDeploy Include="DBMappering.edmx">
<Generator>EntityModelCodeGenerator</Generator>
<LastGenOutput>DBMappering.Designer.cs</LastGenOutput>
</EntityDeploy>
<None Include="DBMappering.edmx.diagram">
<DependentUpon>DBMappering.edmx</DependentUpon>
</None>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
</ItemGroup>
<ItemGroup>
<Content Include="DBMappering.Context.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<DependentUpon>DBMappering.edmx</DependentUpon>
<LastGenOutput>DBMappering.Context.cs</LastGenOutput>
</Content>
<Content Include="DBMappering.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<DependentUpon>DBMappering.edmx</DependentUpon>
<LastGenOutput>DBMappering.cs</LastGenOutput>
</Content>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.props'))" />
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.targets'))" />
</Target>
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.targets" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" />
</Project>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectView>ShowAllFiles</ProjectView>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,30 @@
using Prism.Ioc;
using Prism.Modularity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Cowain.Bake.DAL
{
public class DALModule : IModule
{
public void OnInitialized(IContainerProvider containerProvider)
{
//containerProvider.Resolve<PalletService>().InitPalletBatteryParam(3, 12, 20);
}
public void RegisterTypes(IContainerRegistry containerRegistry)
{
containerRegistry.RegisterSingleton<TaskTypeService>();
containerRegistry.RegisterSingleton<MachineService>();
//containerRegistry.Register<IPalletService, PalletService>();
//containerRegistry.Register<ILoadCodeService, LoadCodeService>();
//containerRegistry.Register<IStationService, StationService>();
//containerRegistry.Register<TaskService>();
//containerRegistry.Register<IScriptService, ScriptService>();
}
}
}

View File

@@ -0,0 +1,53 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Cowain.Bake.Model
{
using System;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
public partial class BakingEntities : DbContext
{
public BakingEntities()
: base("name=BakingEntities")
{
}
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
throw new UnintentionalCodeFirstException();
}
public virtual DbSet<TAlarm> TAlarm { get; set; }
public virtual DbSet<TAlarmContent> TAlarmContent { get; set; }
public virtual DbSet<TBatteryInfo> TBatteryInfo { get; set; }
public virtual DbSet<TBatteryNG> TBatteryNG { get; set; }
public virtual DbSet<TCavityInfo> TCavityInfo { get; set; }
public virtual DbSet<TDeviceConfig> TDeviceConfig { get; set; }
public virtual DbSet<TElectricEnergy> TElectricEnergy { get; set; }
public virtual DbSet<TLog> TLog { get; set; }
public virtual DbSet<TMenuInfo> TMenuInfo { get; set; }
public virtual DbSet<TMesData> TMesData { get; set; }
public virtual DbSet<TPalletInfo> TPalletInfo { get; set; }
public virtual DbSet<TProcessParameter> TProcessParameter { get; set; }
public virtual DbSet<TProductionInformation> TProductionInformation { get; set; }
public virtual DbSet<TRgvAction> TRgvAction { get; set; }
public virtual DbSet<TRoleInfo> TRoleInfo { get; set; }
public virtual DbSet<TStation> TStation { get; set; }
public virtual DbSet<TStoveSctualPatrol> TStoveSctualPatrol { get; set; }
public virtual DbSet<TSysSetup> TSysSetup { get; set; }
public virtual DbSet<TTagList> TTagList { get; set; }
public virtual DbSet<TTaskRecord> TTaskRecord { get; set; }
public virtual DbSet<TTaskStep> TTaskStep { get; set; }
public virtual DbSet<TTaskType> TTaskType { get; set; }
public virtual DbSet<TUserManage> TUserManage { get; set; }
public virtual DbSet<TPalletInfoHistory> TPalletInfoHistory { get; set; }
}
}

View File

@@ -0,0 +1,636 @@
<#@ template language="C#" debug="false" hostspecific="true"#>
<#@ include file="EF6.Utility.CS.ttinclude"#><#@
output extension=".cs"#><#
const string inputFile = @"DBMappering.edmx";
var textTransform = DynamicTextTransformation.Create(this);
var code = new CodeGenerationTools(this);
var ef = new MetadataTools(this);
var typeMapper = new TypeMapper(code, ef, textTransform.Errors);
var loader = new EdmMetadataLoader(textTransform.Host, textTransform.Errors);
var itemCollection = loader.CreateEdmItemCollection(inputFile);
var modelNamespace = loader.GetModelNamespace(inputFile);
var codeStringGenerator = new CodeStringGenerator(code, typeMapper, ef);
var container = itemCollection.OfType<EntityContainer>().FirstOrDefault();
if (container == null)
{
return string.Empty;
}
#>
//------------------------------------------------------------------------------
// <auto-generated>
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine1")#>
//
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine2")#>
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine3")#>
// </auto-generated>
//------------------------------------------------------------------------------
<#
var codeNamespace = code.VsNamespaceSuggestion();
if (!String.IsNullOrEmpty(codeNamespace))
{
#>
namespace <#=code.EscapeNamespace(codeNamespace)#>
{
<#
PushIndent(" ");
}
#>
using System;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
<#
if (container.FunctionImports.Any())
{
#>
using System.Data.Entity.Core.Objects;
using System.Linq;
<#
}
#>
<#=Accessibility.ForType(container)#> partial class <#=code.Escape(container)#> : DbContext
{
public <#=code.Escape(container)#>()
: base("name=<#=container.Name#>")
{
<#
if (!loader.IsLazyLoadingEnabled(container))
{
#>
this.Configuration.LazyLoadingEnabled = false;
<#
}
foreach (var entitySet in container.BaseEntitySets.OfType<EntitySet>())
{
// Note: the DbSet members are defined below such that the getter and
// setter always have the same accessibility as the DbSet definition
if (Accessibility.ForReadOnlyProperty(entitySet) != "public")
{
#>
<#=codeStringGenerator.DbSetInitializer(entitySet)#>
<#
}
}
#>
}
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
throw new UnintentionalCodeFirstException();
}
<#
foreach (var entitySet in container.BaseEntitySets.OfType<EntitySet>())
{
#>
<#=codeStringGenerator.DbSet(entitySet)#>
<#
}
foreach (var edmFunction in container.FunctionImports)
{
WriteFunctionImport(typeMapper, codeStringGenerator, edmFunction, modelNamespace, includeMergeOption: false);
}
#>
}
<#
if (!String.IsNullOrEmpty(codeNamespace))
{
PopIndent();
#>
}
<#
}
#>
<#+
private void WriteFunctionImport(TypeMapper typeMapper, CodeStringGenerator codeStringGenerator, EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
{
if (typeMapper.IsComposable(edmFunction))
{
#>
[DbFunction("<#=edmFunction.NamespaceName#>", "<#=edmFunction.Name#>")]
<#=codeStringGenerator.ComposableFunctionMethod(edmFunction, modelNamespace)#>
{
<#+
codeStringGenerator.WriteFunctionParameters(edmFunction, WriteFunctionParameter);
#>
<#=codeStringGenerator.ComposableCreateQuery(edmFunction, modelNamespace)#>
}
<#+
}
else
{
#>
<#=codeStringGenerator.FunctionMethod(edmFunction, modelNamespace, includeMergeOption)#>
{
<#+
codeStringGenerator.WriteFunctionParameters(edmFunction, WriteFunctionParameter);
#>
<#=codeStringGenerator.ExecuteFunction(edmFunction, modelNamespace, includeMergeOption)#>
}
<#+
if (typeMapper.GenerateMergeOptionFunction(edmFunction, includeMergeOption))
{
WriteFunctionImport(typeMapper, codeStringGenerator, edmFunction, modelNamespace, includeMergeOption: true);
}
}
}
public void WriteFunctionParameter(string name, string isNotNull, string notNullInit, string nullInit)
{
#>
var <#=name#> = <#=isNotNull#> ?
<#=notNullInit#> :
<#=nullInit#>;
<#+
}
public const string TemplateId = "CSharp_DbContext_Context_EF6";
public class CodeStringGenerator
{
private readonly CodeGenerationTools _code;
private readonly TypeMapper _typeMapper;
private readonly MetadataTools _ef;
public CodeStringGenerator(CodeGenerationTools code, TypeMapper typeMapper, MetadataTools ef)
{
ArgumentNotNull(code, "code");
ArgumentNotNull(typeMapper, "typeMapper");
ArgumentNotNull(ef, "ef");
_code = code;
_typeMapper = typeMapper;
_ef = ef;
}
public string Property(EdmProperty edmProperty)
{
return string.Format(
CultureInfo.InvariantCulture,
"{0} {1} {2} {{ {3}get; {4}set; }}",
Accessibility.ForProperty(edmProperty),
_typeMapper.GetTypeName(edmProperty.TypeUsage),
_code.Escape(edmProperty),
_code.SpaceAfter(Accessibility.ForGetter(edmProperty)),
_code.SpaceAfter(Accessibility.ForSetter(edmProperty)));
}
public string NavigationProperty(NavigationProperty navProp)
{
var endType = _typeMapper.GetTypeName(navProp.ToEndMember.GetEntityType());
return string.Format(
CultureInfo.InvariantCulture,
"{0} {1} {2} {{ {3}get; {4}set; }}",
AccessibilityAndVirtual(Accessibility.ForNavigationProperty(navProp)),
navProp.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many ? ("ICollection<" + endType + ">") : endType,
_code.Escape(navProp),
_code.SpaceAfter(Accessibility.ForGetter(navProp)),
_code.SpaceAfter(Accessibility.ForSetter(navProp)));
}
public string AccessibilityAndVirtual(string accessibility)
{
return accessibility + (accessibility != "private" ? " virtual" : "");
}
public string EntityClassOpening(EntityType entity)
{
return string.Format(
CultureInfo.InvariantCulture,
"{0} {1}partial class {2}{3}",
Accessibility.ForType(entity),
_code.SpaceAfter(_code.AbstractOption(entity)),
_code.Escape(entity),
_code.StringBefore(" : ", _typeMapper.GetTypeName(entity.BaseType)));
}
public string EnumOpening(SimpleType enumType)
{
return string.Format(
CultureInfo.InvariantCulture,
"{0} enum {1} : {2}",
Accessibility.ForType(enumType),
_code.Escape(enumType),
_code.Escape(_typeMapper.UnderlyingClrType(enumType)));
}
public void WriteFunctionParameters(EdmFunction edmFunction, Action<string, string, string, string> writeParameter)
{
var parameters = FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
foreach (var parameter in parameters.Where(p => p.NeedsLocalVariable))
{
var isNotNull = parameter.IsNullableOfT ? parameter.FunctionParameterName + ".HasValue" : parameter.FunctionParameterName + " != null";
var notNullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", " + parameter.FunctionParameterName + ")";
var nullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", typeof(" + TypeMapper.FixNamespaces(parameter.RawClrTypeName) + "))";
writeParameter(parameter.LocalVariableName, isNotNull, notNullInit, nullInit);
}
}
public string ComposableFunctionMethod(EdmFunction edmFunction, string modelNamespace)
{
var parameters = _typeMapper.GetParameters(edmFunction);
return string.Format(
CultureInfo.InvariantCulture,
"{0} IQueryable<{1}> {2}({3})",
AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
_typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
_code.Escape(edmFunction),
string.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray()));
}
public string ComposableCreateQuery(EdmFunction edmFunction, string modelNamespace)
{
var parameters = _typeMapper.GetParameters(edmFunction);
return string.Format(
CultureInfo.InvariantCulture,
"return ((IObjectContextAdapter)this).ObjectContext.CreateQuery<{0}>(\"[{1}].[{2}]({3})\"{4});",
_typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
edmFunction.NamespaceName,
edmFunction.Name,
string.Join(", ", parameters.Select(p => "@" + p.EsqlParameterName).ToArray()),
_code.StringBefore(", ", string.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray())));
}
public string FunctionMethod(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
{
var parameters = _typeMapper.GetParameters(edmFunction);
var returnType = _typeMapper.GetReturnType(edmFunction);
var paramList = String.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray());
if (includeMergeOption)
{
paramList = _code.StringAfter(paramList, ", ") + "MergeOption mergeOption";
}
return string.Format(
CultureInfo.InvariantCulture,
"{0} {1} {2}({3})",
AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
returnType == null ? "int" : "ObjectResult<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
_code.Escape(edmFunction),
paramList);
}
public string ExecuteFunction(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
{
var parameters = _typeMapper.GetParameters(edmFunction);
var returnType = _typeMapper.GetReturnType(edmFunction);
var callParams = _code.StringBefore(", ", String.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray()));
if (includeMergeOption)
{
callParams = ", mergeOption" + callParams;
}
return string.Format(
CultureInfo.InvariantCulture,
"return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction{0}(\"{1}\"{2});",
returnType == null ? "" : "<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
edmFunction.Name,
callParams);
}
public string DbSet(EntitySet entitySet)
{
return string.Format(
CultureInfo.InvariantCulture,
"{0} virtual DbSet<{1}> {2} {{ get; set; }}",
Accessibility.ForReadOnlyProperty(entitySet),
_typeMapper.GetTypeName(entitySet.ElementType),
_code.Escape(entitySet));
}
public string DbSetInitializer(EntitySet entitySet)
{
return string.Format(
CultureInfo.InvariantCulture,
"{0} = Set<{1}>();",
_code.Escape(entitySet),
_typeMapper.GetTypeName(entitySet.ElementType));
}
public string UsingDirectives(bool inHeader, bool includeCollections = true)
{
return inHeader == string.IsNullOrEmpty(_code.VsNamespaceSuggestion())
? string.Format(
CultureInfo.InvariantCulture,
"{0}using System;{1}" +
"{2}",
inHeader ? Environment.NewLine : "",
includeCollections ? (Environment.NewLine + "using System.Collections.Generic;") : "",
inHeader ? "" : Environment.NewLine)
: "";
}
}
public class TypeMapper
{
private const string ExternalTypeNameAttributeName = @"http://schemas.microsoft.com/ado/2006/04/codegeneration:ExternalTypeName";
private readonly System.Collections.IList _errors;
private readonly CodeGenerationTools _code;
private readonly MetadataTools _ef;
public static string FixNamespaces(string typeName)
{
return typeName.Replace("System.Data.Spatial.", "System.Data.Entity.Spatial.");
}
public TypeMapper(CodeGenerationTools code, MetadataTools ef, System.Collections.IList errors)
{
ArgumentNotNull(code, "code");
ArgumentNotNull(ef, "ef");
ArgumentNotNull(errors, "errors");
_code = code;
_ef = ef;
_errors = errors;
}
public string GetTypeName(TypeUsage typeUsage)
{
return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace: null);
}
public string GetTypeName(EdmType edmType)
{
return GetTypeName(edmType, isNullable: null, modelNamespace: null);
}
public string GetTypeName(TypeUsage typeUsage, string modelNamespace)
{
return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace);
}
public string GetTypeName(EdmType edmType, string modelNamespace)
{
return GetTypeName(edmType, isNullable: null, modelNamespace: modelNamespace);
}
public string GetTypeName(EdmType edmType, bool? isNullable, string modelNamespace)
{
if (edmType == null)
{
return null;
}
var collectionType = edmType as CollectionType;
if (collectionType != null)
{
return String.Format(CultureInfo.InvariantCulture, "ICollection<{0}>", GetTypeName(collectionType.TypeUsage, modelNamespace));
}
var typeName = _code.Escape(edmType.MetadataProperties
.Where(p => p.Name == ExternalTypeNameAttributeName)
.Select(p => (string)p.Value)
.FirstOrDefault())
?? (modelNamespace != null && edmType.NamespaceName != modelNamespace ?
_code.CreateFullName(_code.EscapeNamespace(edmType.NamespaceName), _code.Escape(edmType)) :
_code.Escape(edmType));
if (edmType is StructuralType)
{
return typeName;
}
if (edmType is SimpleType)
{
var clrType = UnderlyingClrType(edmType);
if (!IsEnumType(edmType))
{
typeName = _code.Escape(clrType);
}
typeName = FixNamespaces(typeName);
return clrType.IsValueType && isNullable == true ?
String.Format(CultureInfo.InvariantCulture, "Nullable<{0}>", typeName) :
typeName;
}
throw new ArgumentException("edmType");
}
public Type UnderlyingClrType(EdmType edmType)
{
ArgumentNotNull(edmType, "edmType");
var primitiveType = edmType as PrimitiveType;
if (primitiveType != null)
{
return primitiveType.ClrEquivalentType;
}
if (IsEnumType(edmType))
{
return GetEnumUnderlyingType(edmType).ClrEquivalentType;
}
return typeof(object);
}
public object GetEnumMemberValue(MetadataItem enumMember)
{
ArgumentNotNull(enumMember, "enumMember");
var valueProperty = enumMember.GetType().GetProperty("Value");
return valueProperty == null ? null : valueProperty.GetValue(enumMember, null);
}
public string GetEnumMemberName(MetadataItem enumMember)
{
ArgumentNotNull(enumMember, "enumMember");
var nameProperty = enumMember.GetType().GetProperty("Name");
return nameProperty == null ? null : (string)nameProperty.GetValue(enumMember, null);
}
public System.Collections.IEnumerable GetEnumMembers(EdmType enumType)
{
ArgumentNotNull(enumType, "enumType");
var membersProperty = enumType.GetType().GetProperty("Members");
return membersProperty != null
? (System.Collections.IEnumerable)membersProperty.GetValue(enumType, null)
: Enumerable.Empty<MetadataItem>();
}
public bool EnumIsFlags(EdmType enumType)
{
ArgumentNotNull(enumType, "enumType");
var isFlagsProperty = enumType.GetType().GetProperty("IsFlags");
return isFlagsProperty != null && (bool)isFlagsProperty.GetValue(enumType, null);
}
public bool IsEnumType(GlobalItem edmType)
{
ArgumentNotNull(edmType, "edmType");
return edmType.GetType().Name == "EnumType";
}
public PrimitiveType GetEnumUnderlyingType(EdmType enumType)
{
ArgumentNotNull(enumType, "enumType");
return (PrimitiveType)enumType.GetType().GetProperty("UnderlyingType").GetValue(enumType, null);
}
public string CreateLiteral(object value)
{
if (value == null || value.GetType() != typeof(TimeSpan))
{
return _code.CreateLiteral(value);
}
return string.Format(CultureInfo.InvariantCulture, "new TimeSpan({0})", ((TimeSpan)value).Ticks);
}
public bool VerifyCaseInsensitiveTypeUniqueness(IEnumerable<string> types, string sourceFile)
{
ArgumentNotNull(types, "types");
ArgumentNotNull(sourceFile, "sourceFile");
var hash = new HashSet<string>(StringComparer.InvariantCultureIgnoreCase);
if (types.Any(item => !hash.Add(item)))
{
_errors.Add(
new CompilerError(sourceFile, -1, -1, "6023",
String.Format(CultureInfo.CurrentCulture, CodeGenerationTools.GetResourceString("Template_CaseInsensitiveTypeConflict"))));
return false;
}
return true;
}
public IEnumerable<SimpleType> GetEnumItemsToGenerate(IEnumerable<GlobalItem> itemCollection)
{
return GetItemsToGenerate<SimpleType>(itemCollection)
.Where(e => IsEnumType(e));
}
public IEnumerable<T> GetItemsToGenerate<T>(IEnumerable<GlobalItem> itemCollection) where T: EdmType
{
return itemCollection
.OfType<T>()
.Where(i => !i.MetadataProperties.Any(p => p.Name == ExternalTypeNameAttributeName))
.OrderBy(i => i.Name);
}
public IEnumerable<string> GetAllGlobalItems(IEnumerable<GlobalItem> itemCollection)
{
return itemCollection
.Where(i => i is EntityType || i is ComplexType || i is EntityContainer || IsEnumType(i))
.Select(g => GetGlobalItemName(g));
}
public string GetGlobalItemName(GlobalItem item)
{
if (item is EdmType)
{
return ((EdmType)item).Name;
}
else
{
return ((EntityContainer)item).Name;
}
}
public IEnumerable<EdmProperty> GetSimpleProperties(EntityType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
}
public IEnumerable<EdmProperty> GetSimpleProperties(ComplexType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
}
public IEnumerable<EdmProperty> GetComplexProperties(EntityType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
}
public IEnumerable<EdmProperty> GetComplexProperties(ComplexType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
}
public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(EntityType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
}
public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(ComplexType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
}
public IEnumerable<NavigationProperty> GetNavigationProperties(EntityType type)
{
return type.NavigationProperties.Where(np => np.DeclaringType == type);
}
public IEnumerable<NavigationProperty> GetCollectionNavigationProperties(EntityType type)
{
return type.NavigationProperties.Where(np => np.DeclaringType == type && np.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many);
}
public FunctionParameter GetReturnParameter(EdmFunction edmFunction)
{
ArgumentNotNull(edmFunction, "edmFunction");
var returnParamsProperty = edmFunction.GetType().GetProperty("ReturnParameters");
return returnParamsProperty == null
? edmFunction.ReturnParameter
: ((IEnumerable<FunctionParameter>)returnParamsProperty.GetValue(edmFunction, null)).FirstOrDefault();
}
public bool IsComposable(EdmFunction edmFunction)
{
ArgumentNotNull(edmFunction, "edmFunction");
var isComposableProperty = edmFunction.GetType().GetProperty("IsComposableAttribute");
return isComposableProperty != null && (bool)isComposableProperty.GetValue(edmFunction, null);
}
public IEnumerable<FunctionImportParameter> GetParameters(EdmFunction edmFunction)
{
return FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
}
public TypeUsage GetReturnType(EdmFunction edmFunction)
{
var returnParam = GetReturnParameter(edmFunction);
return returnParam == null ? null : _ef.GetElementType(returnParam.TypeUsage);
}
public bool GenerateMergeOptionFunction(EdmFunction edmFunction, bool includeMergeOption)
{
var returnType = GetReturnType(edmFunction);
return !includeMergeOption && returnType != null && returnType.EdmType.BuiltInTypeKind == BuiltInTypeKind.EntityType;
}
}
public static void ArgumentNotNull<T>(T arg, string name) where T : class
{
if (arg == null)
{
throw new ArgumentNullException(name);
}
}
#>

View File

@@ -0,0 +1,10 @@
// 为模型“E:\svn\DryingStove\branch\得壹烘烤线6098-006\src\Cowain.Bake.Model\DBMappering.edmx”启用了 T4 代码生成。
// 要启用旧代码生成功能,请将“代码生成策略”设计器属性的值
// 更改为“旧的 ObjectContext”。当在设计器中打开该模型时此属性会出现在
// “属性”窗口中。
// 如果没有生成任何上下文和实体类,可能是因为您创建了空模型但是
// 尚未选择要使用的实体框架版本。要为您的模型生成一个上下文类和实体
// 类,请在设计器中打开该模型,右键单击设计器图面,然后
// 选择“从数据库更新模型...”、“从模型生成数据库...”或“添加代码生成
// 项...”。

View File

@@ -0,0 +1,9 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="3.0" xmlns:edmx="http://schemas.microsoft.com/ado/2009/11/edmx">
<!-- EF Designer content (DO NOT EDIT MANUALLY BELOW HERE) -->
<edmx:Designer xmlns="http://schemas.microsoft.com/ado/2009/11/edmx">
<!-- Diagram content (shape and connector positions) -->
<edmx:Diagrams>
<Diagram DiagramId="6a3c64c2e2814385afd789e8da401978" Name="Diagram1">
<EntityTypeShape EntityType="Model.TAlarm" Width="1.5" PointX="0.75" PointY="0.75" />
<EntityTypeShape EntityType="Model.TAlarmContent" Width="1.5" PointX="2.75" PointY="0.75" />
<EntityTypeShape EntityType="Model.TBatteryInfo" Width="1.5" PointX="0.75" PointY="3.75" />
<EntityTypeShape EntityType="Model.TBatteryNG" Width="1.5" PointX="2.75" PointY="3.75" />
<EntityTypeShape EntityType="Model.TCavityInfo" Width="1.5" PointX="4.75" PointY="0.75" />
<EntityTypeShape EntityType="Model.TDeviceConfig" Width="1.5" PointX="4.75" PointY="5.75" />
<EntityTypeShape EntityType="Model.TElectricEnergy" Width="1.5" PointX="6.75" PointY="0.75" />
<EntityTypeShape EntityType="Model.TLog" Width="1.5" PointX="6.75" PointY="4.75" />
<EntityTypeShape EntityType="Model.TMenuInfo" Width="1.5" PointX="0.75" PointY="7.75" />
<EntityTypeShape EntityType="Model.TMesData" Width="1.5" PointX="6.75" PointY="7.75" />
<EntityTypeShape EntityType="Model.TPalletInfo" Width="1.5" PointX="8.75" PointY="0.75" />
<EntityTypeShape EntityType="Model.TProcessParameter" Width="1.5" PointX="8.75" PointY="7.75" />
<EntityTypeShape EntityType="Model.TProductionInformation" Width="1.5" PointX="2.75" PointY="9.75" />
<EntityTypeShape EntityType="Model.TRgvAction" Width="1.5" PointX="10.75" PointY="0.75" />
<EntityTypeShape EntityType="Model.TRoleInfo" Width="1.5" PointX="10.75" PointY="3.75" />
<EntityTypeShape EntityType="Model.TStation" Width="1.5" PointX="10.75" PointY="6.75" />
<EntityTypeShape EntityType="Model.TStoveSctualPatrol" Width="1.5" PointX="8.75" PointY="10.75" />
<EntityTypeShape EntityType="Model.TSysSetup" Width="1.5" PointX="10.75" PointY="10.75" />
<EntityTypeShape EntityType="Model.TTagList" Width="1.5" PointX="4.75" PointY="11.75" />
<EntityTypeShape EntityType="Model.TTaskRecord" Width="1.5" PointX="12.75" PointY="0.75" />
<EntityTypeShape EntityType="Model.TTaskStep" Width="1.5" PointX="12.75" PointY="4.75" />
<EntityTypeShape EntityType="Model.TTaskType" Width="1.5" PointX="12.75" PointY="7.75" />
<EntityTypeShape EntityType="Model.TUserManage" Width="1.5" PointX="12.75" PointY="11.75" />
<EntityTypeShape EntityType="Model.TPalletInfoHistory" Width="1.5" PointX="0.75" PointY="13.75" />
</Diagram>
</edmx:Diagrams>
</edmx:Designer>
</edmx:Edmx>

View File

@@ -0,0 +1,733 @@
<#@ template language="C#" debug="false" hostspecific="true"#>
<#@ include file="EF6.Utility.CS.ttinclude"#><#@
output extension=".cs"#><#
const string inputFile = @"DBMappering.edmx";
var textTransform = DynamicTextTransformation.Create(this);
var code = new CodeGenerationTools(this);
var ef = new MetadataTools(this);
var typeMapper = new TypeMapper(code, ef, textTransform.Errors);
var fileManager = EntityFrameworkTemplateFileManager.Create(this);
var itemCollection = new EdmMetadataLoader(textTransform.Host, textTransform.Errors).CreateEdmItemCollection(inputFile);
var codeStringGenerator = new CodeStringGenerator(code, typeMapper, ef);
if (!typeMapper.VerifyCaseInsensitiveTypeUniqueness(typeMapper.GetAllGlobalItems(itemCollection), inputFile))
{
return string.Empty;
}
WriteHeader(codeStringGenerator, fileManager);
foreach (var entity in typeMapper.GetItemsToGenerate<EntityType>(itemCollection))
{
fileManager.StartNewFile(entity.Name + ".cs");
BeginNamespace(code);
#>
<#=codeStringGenerator.UsingDirectives(inHeader: false)#>
<#=codeStringGenerator.EntityClassOpening(entity)#>
{
<#
var propertiesWithDefaultValues = typeMapper.GetPropertiesWithDefaultValues(entity);
var collectionNavigationProperties = typeMapper.GetCollectionNavigationProperties(entity);
var complexProperties = typeMapper.GetComplexProperties(entity);
if (propertiesWithDefaultValues.Any() || collectionNavigationProperties.Any() || complexProperties.Any())
{
#>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
public <#=code.Escape(entity)#>()
{
<#
foreach (var edmProperty in propertiesWithDefaultValues)
{
#>
this.<#=code.Escape(edmProperty)#> = <#=typeMapper.CreateLiteral(edmProperty.DefaultValue)#>;
<#
}
foreach (var navigationProperty in collectionNavigationProperties)
{
#>
this.<#=code.Escape(navigationProperty)#> = new HashSet<<#=typeMapper.GetTypeName(navigationProperty.ToEndMember.GetEntityType())#>>();
<#
}
foreach (var complexProperty in complexProperties)
{
#>
this.<#=code.Escape(complexProperty)#> = new <#=typeMapper.GetTypeName(complexProperty.TypeUsage)#>();
<#
}
#>
}
<#
}
var simpleProperties = typeMapper.GetSimpleProperties(entity);
if (simpleProperties.Any())
{
foreach (var edmProperty in simpleProperties)
{
#>
<#=codeStringGenerator.Property(edmProperty)#>
<#
}
}
if (complexProperties.Any())
{
#>
<#
foreach(var complexProperty in complexProperties)
{
#>
<#=codeStringGenerator.Property(complexProperty)#>
<#
}
}
var navigationProperties = typeMapper.GetNavigationProperties(entity);
if (navigationProperties.Any())
{
#>
<#
foreach (var navigationProperty in navigationProperties)
{
if (navigationProperty.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many)
{
#>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
<#
}
#>
<#=codeStringGenerator.NavigationProperty(navigationProperty)#>
<#
}
}
#>
}
<#
EndNamespace(code);
}
foreach (var complex in typeMapper.GetItemsToGenerate<ComplexType>(itemCollection))
{
fileManager.StartNewFile(complex.Name + ".cs");
BeginNamespace(code);
#>
<#=codeStringGenerator.UsingDirectives(inHeader: false, includeCollections: false)#>
<#=Accessibility.ForType(complex)#> partial class <#=code.Escape(complex)#>
{
<#
var complexProperties = typeMapper.GetComplexProperties(complex);
var propertiesWithDefaultValues = typeMapper.GetPropertiesWithDefaultValues(complex);
if (propertiesWithDefaultValues.Any() || complexProperties.Any())
{
#>
public <#=code.Escape(complex)#>()
{
<#
foreach (var edmProperty in propertiesWithDefaultValues)
{
#>
this.<#=code.Escape(edmProperty)#> = <#=typeMapper.CreateLiteral(edmProperty.DefaultValue)#>;
<#
}
foreach (var complexProperty in complexProperties)
{
#>
this.<#=code.Escape(complexProperty)#> = new <#=typeMapper.GetTypeName(complexProperty.TypeUsage)#>();
<#
}
#>
}
<#
}
var simpleProperties = typeMapper.GetSimpleProperties(complex);
if (simpleProperties.Any())
{
foreach(var edmProperty in simpleProperties)
{
#>
<#=codeStringGenerator.Property(edmProperty)#>
<#
}
}
if (complexProperties.Any())
{
#>
<#
foreach(var edmProperty in complexProperties)
{
#>
<#=codeStringGenerator.Property(edmProperty)#>
<#
}
}
#>
}
<#
EndNamespace(code);
}
foreach (var enumType in typeMapper.GetEnumItemsToGenerate(itemCollection))
{
fileManager.StartNewFile(enumType.Name + ".cs");
BeginNamespace(code);
#>
<#=codeStringGenerator.UsingDirectives(inHeader: false, includeCollections: false)#>
<#
if (typeMapper.EnumIsFlags(enumType))
{
#>
[Flags]
<#
}
#>
<#=codeStringGenerator.EnumOpening(enumType)#>
{
<#
var foundOne = false;
foreach (MetadataItem member in typeMapper.GetEnumMembers(enumType))
{
foundOne = true;
#>
<#=code.Escape(typeMapper.GetEnumMemberName(member))#> = <#=typeMapper.GetEnumMemberValue(member)#>,
<#
}
if (foundOne)
{
this.GenerationEnvironment.Remove(this.GenerationEnvironment.Length - 3, 1);
}
#>
}
<#
EndNamespace(code);
}
fileManager.Process();
#>
<#+
public void WriteHeader(CodeStringGenerator codeStringGenerator, EntityFrameworkTemplateFileManager fileManager)
{
fileManager.StartHeader();
#>
//------------------------------------------------------------------------------
// <auto-generated>
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine1")#>
//
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine2")#>
// <#=CodeGenerationTools.GetResourceString("Template_GeneratedCodeCommentLine3")#>
// </auto-generated>
//------------------------------------------------------------------------------
<#=codeStringGenerator.UsingDirectives(inHeader: true)#>
<#+
fileManager.EndBlock();
}
public void BeginNamespace(CodeGenerationTools code)
{
var codeNamespace = code.VsNamespaceSuggestion();
if (!String.IsNullOrEmpty(codeNamespace))
{
#>
namespace <#=code.EscapeNamespace(codeNamespace)#>
{
<#+
PushIndent(" ");
}
}
public void EndNamespace(CodeGenerationTools code)
{
if (!String.IsNullOrEmpty(code.VsNamespaceSuggestion()))
{
PopIndent();
#>
}
<#+
}
}
public const string TemplateId = "CSharp_DbContext_Types_EF6";
public class CodeStringGenerator
{
private readonly CodeGenerationTools _code;
private readonly TypeMapper _typeMapper;
private readonly MetadataTools _ef;
public CodeStringGenerator(CodeGenerationTools code, TypeMapper typeMapper, MetadataTools ef)
{
ArgumentNotNull(code, "code");
ArgumentNotNull(typeMapper, "typeMapper");
ArgumentNotNull(ef, "ef");
_code = code;
_typeMapper = typeMapper;
_ef = ef;
}
public string Property(EdmProperty edmProperty)
{
return string.Format(
CultureInfo.InvariantCulture,
"{0} {1} {2} {{ {3}get; {4}set; }}",
Accessibility.ForProperty(edmProperty),
_typeMapper.GetTypeName(edmProperty.TypeUsage),
_code.Escape(edmProperty),
_code.SpaceAfter(Accessibility.ForGetter(edmProperty)),
_code.SpaceAfter(Accessibility.ForSetter(edmProperty)));
}
public string NavigationProperty(NavigationProperty navProp)
{
var endType = _typeMapper.GetTypeName(navProp.ToEndMember.GetEntityType());
return string.Format(
CultureInfo.InvariantCulture,
"{0} {1} {2} {{ {3}get; {4}set; }}",
AccessibilityAndVirtual(Accessibility.ForNavigationProperty(navProp)),
navProp.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many ? ("ICollection<" + endType + ">") : endType,
_code.Escape(navProp),
_code.SpaceAfter(Accessibility.ForGetter(navProp)),
_code.SpaceAfter(Accessibility.ForSetter(navProp)));
}
public string AccessibilityAndVirtual(string accessibility)
{
return accessibility + (accessibility != "private" ? " virtual" : "");
}
public string EntityClassOpening(EntityType entity)
{
return string.Format(
CultureInfo.InvariantCulture,
"{0} {1}partial class {2}{3}",
Accessibility.ForType(entity),
_code.SpaceAfter(_code.AbstractOption(entity)),
_code.Escape(entity),
_code.StringBefore(" : ", _typeMapper.GetTypeName(entity.BaseType)));
}
public string EnumOpening(SimpleType enumType)
{
return string.Format(
CultureInfo.InvariantCulture,
"{0} enum {1} : {2}",
Accessibility.ForType(enumType),
_code.Escape(enumType),
_code.Escape(_typeMapper.UnderlyingClrType(enumType)));
}
public void WriteFunctionParameters(EdmFunction edmFunction, Action<string, string, string, string> writeParameter)
{
var parameters = FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
foreach (var parameter in parameters.Where(p => p.NeedsLocalVariable))
{
var isNotNull = parameter.IsNullableOfT ? parameter.FunctionParameterName + ".HasValue" : parameter.FunctionParameterName + " != null";
var notNullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", " + parameter.FunctionParameterName + ")";
var nullInit = "new ObjectParameter(\"" + parameter.EsqlParameterName + "\", typeof(" + TypeMapper.FixNamespaces(parameter.RawClrTypeName) + "))";
writeParameter(parameter.LocalVariableName, isNotNull, notNullInit, nullInit);
}
}
public string ComposableFunctionMethod(EdmFunction edmFunction, string modelNamespace)
{
var parameters = _typeMapper.GetParameters(edmFunction);
return string.Format(
CultureInfo.InvariantCulture,
"{0} IQueryable<{1}> {2}({3})",
AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
_typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
_code.Escape(edmFunction),
string.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray()));
}
public string ComposableCreateQuery(EdmFunction edmFunction, string modelNamespace)
{
var parameters = _typeMapper.GetParameters(edmFunction);
return string.Format(
CultureInfo.InvariantCulture,
"return ((IObjectContextAdapter)this).ObjectContext.CreateQuery<{0}>(\"[{1}].[{2}]({3})\"{4});",
_typeMapper.GetTypeName(_typeMapper.GetReturnType(edmFunction), modelNamespace),
edmFunction.NamespaceName,
edmFunction.Name,
string.Join(", ", parameters.Select(p => "@" + p.EsqlParameterName).ToArray()),
_code.StringBefore(", ", string.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray())));
}
public string FunctionMethod(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
{
var parameters = _typeMapper.GetParameters(edmFunction);
var returnType = _typeMapper.GetReturnType(edmFunction);
var paramList = String.Join(", ", parameters.Select(p => TypeMapper.FixNamespaces(p.FunctionParameterType) + " " + p.FunctionParameterName).ToArray());
if (includeMergeOption)
{
paramList = _code.StringAfter(paramList, ", ") + "MergeOption mergeOption";
}
return string.Format(
CultureInfo.InvariantCulture,
"{0} {1} {2}({3})",
AccessibilityAndVirtual(Accessibility.ForMethod(edmFunction)),
returnType == null ? "int" : "ObjectResult<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
_code.Escape(edmFunction),
paramList);
}
public string ExecuteFunction(EdmFunction edmFunction, string modelNamespace, bool includeMergeOption)
{
var parameters = _typeMapper.GetParameters(edmFunction);
var returnType = _typeMapper.GetReturnType(edmFunction);
var callParams = _code.StringBefore(", ", String.Join(", ", parameters.Select(p => p.ExecuteParameterName).ToArray()));
if (includeMergeOption)
{
callParams = ", mergeOption" + callParams;
}
return string.Format(
CultureInfo.InvariantCulture,
"return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction{0}(\"{1}\"{2});",
returnType == null ? "" : "<" + _typeMapper.GetTypeName(returnType, modelNamespace) + ">",
edmFunction.Name,
callParams);
}
public string DbSet(EntitySet entitySet)
{
return string.Format(
CultureInfo.InvariantCulture,
"{0} virtual DbSet<{1}> {2} {{ get; set; }}",
Accessibility.ForReadOnlyProperty(entitySet),
_typeMapper.GetTypeName(entitySet.ElementType),
_code.Escape(entitySet));
}
public string UsingDirectives(bool inHeader, bool includeCollections = true)
{
return inHeader == string.IsNullOrEmpty(_code.VsNamespaceSuggestion())
? string.Format(
CultureInfo.InvariantCulture,
"{0}using System;{1}" +
"{2}",
inHeader ? Environment.NewLine : "",
includeCollections ? (Environment.NewLine + "using System.Collections.Generic;") : "",
inHeader ? "" : Environment.NewLine)
: "";
}
}
public class TypeMapper
{
private const string ExternalTypeNameAttributeName = @"http://schemas.microsoft.com/ado/2006/04/codegeneration:ExternalTypeName";
private readonly System.Collections.IList _errors;
private readonly CodeGenerationTools _code;
private readonly MetadataTools _ef;
public TypeMapper(CodeGenerationTools code, MetadataTools ef, System.Collections.IList errors)
{
ArgumentNotNull(code, "code");
ArgumentNotNull(ef, "ef");
ArgumentNotNull(errors, "errors");
_code = code;
_ef = ef;
_errors = errors;
}
public static string FixNamespaces(string typeName)
{
return typeName.Replace("System.Data.Spatial.", "System.Data.Entity.Spatial.");
}
public string GetTypeName(TypeUsage typeUsage)
{
return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace: null);
}
public string GetTypeName(EdmType edmType)
{
return GetTypeName(edmType, isNullable: null, modelNamespace: null);
}
public string GetTypeName(TypeUsage typeUsage, string modelNamespace)
{
return typeUsage == null ? null : GetTypeName(typeUsage.EdmType, _ef.IsNullable(typeUsage), modelNamespace);
}
public string GetTypeName(EdmType edmType, string modelNamespace)
{
return GetTypeName(edmType, isNullable: null, modelNamespace: modelNamespace);
}
public string GetTypeName(EdmType edmType, bool? isNullable, string modelNamespace)
{
if (edmType == null)
{
return null;
}
var collectionType = edmType as CollectionType;
if (collectionType != null)
{
return String.Format(CultureInfo.InvariantCulture, "ICollection<{0}>", GetTypeName(collectionType.TypeUsage, modelNamespace));
}
var typeName = _code.Escape(edmType.MetadataProperties
.Where(p => p.Name == ExternalTypeNameAttributeName)
.Select(p => (string)p.Value)
.FirstOrDefault())
?? (modelNamespace != null && edmType.NamespaceName != modelNamespace ?
_code.CreateFullName(_code.EscapeNamespace(edmType.NamespaceName), _code.Escape(edmType)) :
_code.Escape(edmType));
if (edmType is StructuralType)
{
return typeName;
}
if (edmType is SimpleType)
{
var clrType = UnderlyingClrType(edmType);
if (!IsEnumType(edmType))
{
typeName = _code.Escape(clrType);
}
typeName = FixNamespaces(typeName);
return clrType.IsValueType && isNullable == true ?
String.Format(CultureInfo.InvariantCulture, "Nullable<{0}>", typeName) :
typeName;
}
throw new ArgumentException("edmType");
}
public Type UnderlyingClrType(EdmType edmType)
{
ArgumentNotNull(edmType, "edmType");
var primitiveType = edmType as PrimitiveType;
if (primitiveType != null)
{
return primitiveType.ClrEquivalentType;
}
if (IsEnumType(edmType))
{
return GetEnumUnderlyingType(edmType).ClrEquivalentType;
}
return typeof(object);
}
public object GetEnumMemberValue(MetadataItem enumMember)
{
ArgumentNotNull(enumMember, "enumMember");
var valueProperty = enumMember.GetType().GetProperty("Value");
return valueProperty == null ? null : valueProperty.GetValue(enumMember, null);
}
public string GetEnumMemberName(MetadataItem enumMember)
{
ArgumentNotNull(enumMember, "enumMember");
var nameProperty = enumMember.GetType().GetProperty("Name");
return nameProperty == null ? null : (string)nameProperty.GetValue(enumMember, null);
}
public System.Collections.IEnumerable GetEnumMembers(EdmType enumType)
{
ArgumentNotNull(enumType, "enumType");
var membersProperty = enumType.GetType().GetProperty("Members");
return membersProperty != null
? (System.Collections.IEnumerable)membersProperty.GetValue(enumType, null)
: Enumerable.Empty<MetadataItem>();
}
public bool EnumIsFlags(EdmType enumType)
{
ArgumentNotNull(enumType, "enumType");
var isFlagsProperty = enumType.GetType().GetProperty("IsFlags");
return isFlagsProperty != null && (bool)isFlagsProperty.GetValue(enumType, null);
}
public bool IsEnumType(GlobalItem edmType)
{
ArgumentNotNull(edmType, "edmType");
return edmType.GetType().Name == "EnumType";
}
public PrimitiveType GetEnumUnderlyingType(EdmType enumType)
{
ArgumentNotNull(enumType, "enumType");
return (PrimitiveType)enumType.GetType().GetProperty("UnderlyingType").GetValue(enumType, null);
}
public string CreateLiteral(object value)
{
if (value == null || value.GetType() != typeof(TimeSpan))
{
return _code.CreateLiteral(value);
}
return string.Format(CultureInfo.InvariantCulture, "new TimeSpan({0})", ((TimeSpan)value).Ticks);
}
public bool VerifyCaseInsensitiveTypeUniqueness(IEnumerable<string> types, string sourceFile)
{
ArgumentNotNull(types, "types");
ArgumentNotNull(sourceFile, "sourceFile");
var hash = new HashSet<string>(StringComparer.InvariantCultureIgnoreCase);
if (types.Any(item => !hash.Add(item)))
{
_errors.Add(
new CompilerError(sourceFile, -1, -1, "6023",
String.Format(CultureInfo.CurrentCulture, CodeGenerationTools.GetResourceString("Template_CaseInsensitiveTypeConflict"))));
return false;
}
return true;
}
public IEnumerable<SimpleType> GetEnumItemsToGenerate(IEnumerable<GlobalItem> itemCollection)
{
return GetItemsToGenerate<SimpleType>(itemCollection)
.Where(e => IsEnumType(e));
}
public IEnumerable<T> GetItemsToGenerate<T>(IEnumerable<GlobalItem> itemCollection) where T: EdmType
{
return itemCollection
.OfType<T>()
.Where(i => !i.MetadataProperties.Any(p => p.Name == ExternalTypeNameAttributeName))
.OrderBy(i => i.Name);
}
public IEnumerable<string> GetAllGlobalItems(IEnumerable<GlobalItem> itemCollection)
{
return itemCollection
.Where(i => i is EntityType || i is ComplexType || i is EntityContainer || IsEnumType(i))
.Select(g => GetGlobalItemName(g));
}
public string GetGlobalItemName(GlobalItem item)
{
if (item is EdmType)
{
return ((EdmType)item).Name;
}
else
{
return ((EntityContainer)item).Name;
}
}
public IEnumerable<EdmProperty> GetSimpleProperties(EntityType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
}
public IEnumerable<EdmProperty> GetSimpleProperties(ComplexType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type);
}
public IEnumerable<EdmProperty> GetComplexProperties(EntityType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
}
public IEnumerable<EdmProperty> GetComplexProperties(ComplexType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is ComplexType && p.DeclaringType == type);
}
public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(EntityType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
}
public IEnumerable<EdmProperty> GetPropertiesWithDefaultValues(ComplexType type)
{
return type.Properties.Where(p => p.TypeUsage.EdmType is SimpleType && p.DeclaringType == type && p.DefaultValue != null);
}
public IEnumerable<NavigationProperty> GetNavigationProperties(EntityType type)
{
return type.NavigationProperties.Where(np => np.DeclaringType == type);
}
public IEnumerable<NavigationProperty> GetCollectionNavigationProperties(EntityType type)
{
return type.NavigationProperties.Where(np => np.DeclaringType == type && np.ToEndMember.RelationshipMultiplicity == RelationshipMultiplicity.Many);
}
public FunctionParameter GetReturnParameter(EdmFunction edmFunction)
{
ArgumentNotNull(edmFunction, "edmFunction");
var returnParamsProperty = edmFunction.GetType().GetProperty("ReturnParameters");
return returnParamsProperty == null
? edmFunction.ReturnParameter
: ((IEnumerable<FunctionParameter>)returnParamsProperty.GetValue(edmFunction, null)).FirstOrDefault();
}
public bool IsComposable(EdmFunction edmFunction)
{
ArgumentNotNull(edmFunction, "edmFunction");
var isComposableProperty = edmFunction.GetType().GetProperty("IsComposableAttribute");
return isComposableProperty != null && (bool)isComposableProperty.GetValue(edmFunction, null);
}
public IEnumerable<FunctionImportParameter> GetParameters(EdmFunction edmFunction)
{
return FunctionImportParameter.Create(edmFunction.Parameters, _code, _ef);
}
public TypeUsage GetReturnType(EdmFunction edmFunction)
{
var returnParam = GetReturnParameter(edmFunction);
return returnParam == null ? null : _ef.GetElementType(returnParam.TypeUsage);
}
public bool GenerateMergeOptionFunction(EdmFunction edmFunction, bool includeMergeOption)
{
var returnType = GetReturnType(edmFunction);
return !includeMergeOption && returnType != null && returnType.EdmType.BuiltInTypeKind == BuiltInTypeKind.EntityType;
}
}
public static void ArgumentNotNull<T>(T arg, string name) where T : class
{
if (arg == null)
{
throw new ArgumentNullException(name);
}
}
#>

View File

@@ -0,0 +1,50 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
namespace Cowain.Bake.Model.Entity
{
public class AuthorityEntity:INotifyPropertyChanged
{
public AuthorityEntity()
{
Children = new ObservableCollection<AuthorityEntity>();
}
public int MenuId { get; set; }
public string Header { get; set; }
public string HeaderName { get; set; }
public string TargetView { get; set; }
public int? ParentId { get; set; }
public Visibility CheckboxVisibility { get; set; }
public ObservableCollection<AuthorityEntity> Children { get; set; }
private bool isHasAuthority;
public bool IsHasAuthority
{
get { return isHasAuthority; }
set
{
if (isHasAuthority != value)
{
isHasAuthority = value;
OnPropertyChanged("IsHasAuthority");
}
}
}
public event PropertyChangedEventHandler PropertyChanged;
private void OnPropertyChanged(string propName)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propName));
}
}
}

View File

@@ -0,0 +1,22 @@
using System;
namespace Cowain.Bake.Model.Entity
{
public class BatteryInfoEntity : TBatteryInfo
{
public string PalletCode { get; set; }
public string BakingLocation { get; set; }
public Nullable<int> BakingPosition { get; set; }
public Nullable<int> BakingCount { get; set; }
public Nullable<System.DateTime> LoadingBegingTime { get; set; }
public Nullable<System.DateTime> LoadingOverTime { get; set; }
public Nullable<System.DateTime> BakingBeginTime { get; set; }
public Nullable<System.DateTime> BakingOverTime { get; set; }
public Nullable<System.DateTime> UnLoadingBegingTime { get; set; }
public Nullable<System.DateTime> UnLoadingOverTime { get; set; }
public string WaterValue { get; set; }
public string AnodeValue { get; set; }
public string SeptumValue { get; set; }
public string CathodeValue { get; set; }
}
}

View File

@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Cowain.Bake.Model.Entity
{
public class CavityInfoPalletEntity : TCavityInfo
{
public int PalletStatus { get; set; }
public string JobNum { get; set; }
public Nullable<bool> LastFlag { get; set; }
}
}

View File

@@ -0,0 +1,9 @@
namespace Cowain.Bake.Model.Entity
{
public class MesDataEntity : TMesData
{
public string BatteryCode { get; set; }
public bool IsCheck { get; set; } = false;
}
}

View File

@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Cowain.Bake.Model.Entity
{
public class MoveInfoEntity
{
public string Name { get; set; }
public Nullable<int> PalletStatus { get; set; }
public string PalletCode { get; set; }
public Nullable<int> BatteryQty { get; set; }
public Nullable<System.DateTime> BeginBakingTime { get; set; }
public Nullable<System.DateTime> BakingOverTime { get; set; }
public Nullable<int> BakingDuration { get; set; }
}
}

View File

@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Cowain.Bake.Model.Entity
{
public class OutputEntity
{
public string ProductionDate { get; set; }
public int DayInput { get; set; }
public int DayOutput { get; set; }
public int DayNG { get; set; }
public int NightInput { get; set; }
public int NightOutput { get; set; }
public int NightNG { get; set; }
public string DayWorkTime { get; set; }
public string NightWorkTime { get; set; }
public decimal DayNGRate { get; set; }
public decimal NightNGRate { get; set; }
}
}

View File

@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Cowain.Bake.Model.Entity
{
public class StationDataEntity
{
public int Id { get; set; }
public int StationStep { get; set; }
public int Qty { get; set; }
public int NGQty { get; set; }
}
}

View File

@@ -0,0 +1,24 @@
using Cowain.Bake.Model.Models;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Cowain.Bake.Model.Entity
{
public class StorageArea
{
public int Id { get; set; }
public int StationId { get; set; }
public string AddressType { get; set; }
public string StartAddress { get; set; } //HSL通过这个地址去读
public List<string> Addresses = new List<string>(); //OPC通过这个节点去读
public List<string> OPCNodes = new List<string>(); //OPC通过这个节点去读
public string ReadAddress { get; set; }
public int Len { get; set; }
public List<Variable> VariableList { get; set; } = new List<Variable>();
}
}

View File

@@ -0,0 +1,14 @@
using Cowain.Bake.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Cowain.Bake.Model.Entity
{
public class TagEntity: TTagList
{
public int StationId { get; set; }
}
}

View File

@@ -0,0 +1,29 @@
using System;
using System.Reflection;
namespace Cowain.Bake.Model.Entity
{
public class TaskEntity : TTaskRecord
{
public int FromStationNumber { get; set; }
public int FromRow { get; set; }
public int FromColumn { get; set; }
public int ToStationNumber { get; set; }
public int ToRow { get; set; }
public int ToColumn { get; set; }
public int CountCmd { get; set; }
//public void Copy(TTaskRecord parent, TaskEntity child)
//{
// foreach (PropertyInfo prop in typeof(TTaskRecord).GetProperties())
// {
// if (prop.CanRead && prop.CanWrite)
// {
// var value = prop.GetValue(parent);
// prop.SetValue(child, value);
// }
// }
//}
}
}

View File

@@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Cowain.Bake.Model.Entity
{
public class UserEntity : TUserManage
{
/// <summary>
/// 子类构造函数
/// </summary>
/// <param name="parent">父类对象</param>
public void Copy(TUserManage parent)
{
var parentProperties = parent.GetType().GetProperties();
foreach (var parentProperty in parentProperties)
{
var thisProperty = this.GetType().GetProperty(parentProperty.Name, parentProperty.PropertyType);
var value = parentProperty.GetValue(parent);
if (thisProperty != null && value != null && thisProperty.CanWrite)
{
thisProperty.SetValue(this, value);
}
}
}
public List<TMenuInfo> Menus { get; set; } = new List<TMenuInfo>();
/// <summary>
/// 工单
/// </summary>
public string JobNum { get; set; }
/// <summary>
/// 工艺
/// </summary>
public string ProcessParamName { get; set; }
}
}

View File

@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Cowain.Bake.Model.Entity
{
public class WorkOrderFormulaEntity:TProductionInformation
{
public string Parameters { get; set; }
public string ProcessParamName { get; set; }
public bool? BaseFlag { get; set; }
}
}

View File

@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Cowain.Bake.Model.Entity
{
public class WorkStepEntity
{
public string WorkStepName { get; set; }
public int WorkStep1 { get; set; }
public int WorkStep2 { get; set; }
public int WorkStep3 { get; set; }
public int WorkStep4 { get; set; }
public int WorkStep5 { get; set; }
public int WorkStep6 { get; set; }
public int WorkStep7 { get; set; }
public int WorkStep8 { get; set; }
public int WorkStep9 { get; set; }
public int WorkStep10 { get; set; }
public int WorkStep11 { get; set; }
public int WorkStep12 { get; set; }
public int WorkStep13 { get; set; }
public int WorkStep14 { get; set; }
public int WorkStep15 { get; set; }
public int WorkStep16 { get; set; }
public int WorkStep17 { get; set; }
public int WorkStep18 { get; set; }
public int WorkStep19 { get; set; }
public int WorkStep20 { get; set; }
}
}

View File

@@ -0,0 +1,13 @@
using System;
namespace Cowain.Bake.Model.Models
{
public class BtnInfoModel
{
public int Id { get; set; }
public int StationId { get; set; }
public string Name { get; set; }
public string BatteryCode { get; set; }
public DateTime StartTime { get; set; }
public string Desc { get; set; }
}
}

View File

@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Cowain.Bake.Model.Models
{
public class CCommandType
{
public string Service { get; set; }
public string Func { get; set; }
public string UrlCmd { get; set; }
public CCommandType()
{
Service = "UploadMesStation";
Func = "UploadCommon";
}
}
}

View File

@@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Cowain.Bake.Model.Models
{
public class CavityHeaderModel
{
public int Id { get; set; }
public int BatteryQty { get; set; }
public int BakingCount { get; set; }
public int TotalBakingCount { get; set; }
public string JobNum { get; set; }
public int VirtualId { get; set; }
public int BakingPosition { get; set; }
public bool Lock { get; set; }
public string Enable { get; set; }
public string IsWater { get; set; }
public int PalletId { get; set; }
public string PalletCode { get; set; }
public Nullable<int> PalletStatus { get; set; }
public string WaterValue { get; set; }
public int Layer { get; set; }
public bool? LastFlag { get; set; }
public string Remark { get; set; }
public sbyte LayerType { get; set; }
}
}

View File

@@ -0,0 +1,27 @@
using Cowain.Bake.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Cowain.Bake.Model.Models
{
public class CavityInfoModel : TStation
{
public string CavityName { get; set; }
public bool IsLoad { get; set; }
public int PalletId { get; set; }
public bool Lock { get; set; }
public sbyte Layer { get; set; }
public sbyte Column { get; set; }
public int StationId { get; set; }
public sbyte StationNumber { get; set; }
public sbyte StationX { get; set; }
public sbyte StationY { get; set; }
public sbyte Status { get; set; }
public bool IsOpen { get; set; }
public bool CavityEnable { get; set; }
public string Remark { get; set; }
}
}

View File

@@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Cowain.Bake.Model.Models
{
public class ExCavityInfoModel : CavityInfoModel
{
public int? VirtualId { get; set; }
public string PalletCode { get; set; }
public int? PalletStatus { get; set; }
public Nullable<int> BakingPosition { get; set; }
public Nullable<int> LoadingPosition { get; set; }
public Nullable<int> UnLoadingPosition { get; set; }
public int? BatteryQty { get; set; }
public int? BakingCount { get; set; }
public Nullable<System.DateTime> LoadingBegingTime { get; set; }
public Nullable<System.DateTime> LoadingOverTime { get; set; }
public Nullable<System.DateTime> InStoveTime { get; set; }
public Nullable<System.DateTime> BakingBeginTime { get; set; }
public Nullable<System.DateTime> BakingOverTime { get; set; }
public Nullable<System.DateTime> OutStoveTime { get; set; }
public Nullable<System.DateTime> UnLoadingBegingTime { get; set; }
public Nullable<System.DateTime> UnLoadingOverTime { get; set; }
public string JobNum { get; set; }
public Nullable<System.DateTime> ScanTime { get; set; }
public Nullable<System.DateTime> CreateTime { get; set; }
public Nullable<bool> LastFlag { get; set; }
public string WaterValue { get; set; }
public Nullable<float> UnLoadingCoolTemp { get; set; }
public Nullable<int> TotalBakingCount { get; set; }
}
}

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media;
namespace Cowain.Bake.Model.Models
{
public class LegendEntry
{
public string Status { get; set; }
public double Left { get; set; }
public double Top { get; set; }
public Color Color { get; set; }
public string Description { get; set; }
}
}

View File

@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Cowain.Bake.Model.Models
{
// 自定义事件(发布订阅此事件时,会传递 StoveDataModel 类型的数据)
public class StoveDataEvent : Prism.Events.PubSubEvent<Dictionary<int, StoveDataModel>> { }
public class StoveDataModel
{
public float[] Temps { get; set; } //温度
public float Vacuum { get; set; } //真空值
public UInt16 WorkTime { get; set; } //工作时长
public UInt16 TotalWorkTime { get; set; } //总工作时长
}
public class AlarmAddEvent : Prism.Events.PubSubEvent<TAlarm>
{
}
public class AlarmCancelEvent : Prism.Events.PubSubEvent<TAlarm>
{
}
public class AlarmStaionCancelEvent : Prism.Events.PubSubEvent<int>
{
}
}

View File

@@ -0,0 +1,53 @@
using System;
using Prism.Mvvm;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Cowain.Bake.Model.Models
{
public class Variable : BindableBase
{
public int Id { get; set; }//id
public int PlcId { get; set; }//PLCId
public int Index { get; set; }//索引
public int Number { get; set; } //层号或编号
private bool quality;//属性
public bool Quality
{
get { return quality; }
set { SetProperty(ref quality, value); }
}
public int OperType { get; set; }//操作类型
public bool TrigEnable { get; set; } = false;//目标是否可用
public string TrigJson { get; set; }//目标json
public string ParamName { get; set; }//参数名称
public int StationId { get; set; }//机器Id
public string Json { get; set; }//json
public string VarType { get; set; }//类型
public string VarDesc { get; set; }//描述
public string VarName { get; set; }//名称
public int Offset { get; set; }//开关
public string AddressType { get; set; }//地址类型
public string Address { get; set; }//地址
public int Bit { get; set; }//字节
public int ArrayLength { get; set; } = 1;//数字长度
public int TagType { get; set; }//标志类型
/// <summary>
/// 跟数据类型相关,不同协议,不同数据类型读长度不同
/// </summary>
public int ReadLength { get; set; } = 1;//读取长度
private object _curValue;
public object CurValue { get => _curValue; set => SetProperty(ref _curValue, value); } //当前值,
public DateTime UpLoadTime { get; set; } //采集时间,用于知道间隔时间,来判断是否存入
public object OldValue { get; set; }
private object _value;
public object Value { get => _value; set => SetProperty(ref _value, value); } //界面上显示的值
}
}

View File

@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Cowain.Bake.Model.Models
{
public class WaterModel
{
public int Id { get; set; } = 1;
public string BatteryCode { get; set; }
//正极
public string AnodeWaterValue { get; set; } = "0";
//隔膜
public string SeptumWaterValue { get; set; } = "0";
//负极
public string CathodeWaterValue { get; set; } = "0";
}
}

View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("Cowain.Bake.BLL")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Cowain.Bake.BLL")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("362f196c-7c59-4dfb-9a3e-85f880791312")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Cowain.Bake.Model
{
using System;
using System.Collections.Generic;
public partial class TAlarm
{
public int Id { get; set; }
public Nullable<int> StationId { get; set; }
public string Desc { get; set; }
public System.DateTime StartTime { get; set; }
public Nullable<System.DateTime> StopTime { get; set; }
public string Status { get; set; }
}
}

View File

@@ -0,0 +1,22 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Cowain.Bake.Model
{
using System;
using System.Collections.Generic;
public partial class TAlarmContent
{
public int Id { get; set; }
public string TagIds { get; set; }
public Nullable<int> Offset { get; set; }
public string Desc { get; set; }
}
}

View File

@@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Cowain.Bake.Model
{
using System;
using System.Collections.Generic;
public partial class TBatteryInfo
{
public int Id { get; set; }
public Nullable<int> PalletVirtualId { get; set; }
public string BatteryCode { get; set; }
public Nullable<sbyte> BatteryStatus { get; set; }
public Nullable<sbyte> PositionX { get; set; }
public Nullable<sbyte> PositionY { get; set; }
public Nullable<System.DateTime> ScanTime { get; set; }
public Nullable<System.DateTime> BindingTime { get; set; }
public Nullable<System.DateTime> UnbindingTime { get; set; }
public bool DummyFlag { get; set; }
public Nullable<float> CoolTemp { get; set; }
public string Remarks { get; set; }
}
}

View File

@@ -0,0 +1,23 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Cowain.Bake.Model
{
using System;
using System.Collections.Generic;
public partial class TBatteryNG
{
public int Id { get; set; }
public string PalletCode { get; set; }
public string BatteryCode { get; set; }
public System.DateTime CreateTime { get; set; }
public string Desc { get; set; }
}
}

View File

@@ -0,0 +1,34 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Cowain.Bake.Model
{
using System;
using System.Collections.Generic;
public partial class TCavityInfo
{
public int Id { get; set; }
public byte StationId { get; set; }
public string Name { get; set; }
public bool IsLoad { get; set; }
public int PalletId { get; set; }
public bool Lock { get; set; }
public Nullable<sbyte> Status { get; set; }
public sbyte Layer { get; set; }
public sbyte Column { get; set; }
public sbyte StationNumber { get; set; }
public sbyte StationX { get; set; }
public sbyte StationY { get; set; }
public bool IsOpen { get; set; }
public bool Enable { get; set; }
public string Remark { get; set; }
public sbyte LayerType { get; set; }
}
}

View File

@@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Cowain.Bake.Model
{
using System;
using System.Collections.Generic;
public partial class TDeviceConfig
{
public int Id { get; set; }
public string Name { get; set; }
public string DriverName { get; set; }
public bool Enable { get; set; }
public bool IsConnect { get; set; }
public string Desc { get; set; }
public string Json { get; set; }
public Nullable<sbyte> Type { get; set; }
}
}

View File

@@ -0,0 +1,28 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Cowain.Bake.Model
{
using System;
using System.Collections.Generic;
public partial class TElectricEnergy
{
public long Id { get; set; }
public Nullable<int> StationId { get; set; }
public Nullable<float> ElectricityA { get; set; }
public Nullable<float> ElectricityB { get; set; }
public Nullable<float> ElectricityC { get; set; }
public Nullable<float> VoltageA { get; set; }
public Nullable<float> VoltageB { get; set; }
public Nullable<float> VoltageC { get; set; }
public Nullable<float> ElectricEnergy { get; set; }
public System.DateTime CreateTime { get; set; }
}
}

22
Cowain.Bake.Model/TLog.cs Normal file
View File

@@ -0,0 +1,22 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Cowain.Bake.Model
{
using System;
using System.Collections.Generic;
public partial class TLog
{
public long Id { get; set; }
public string Content { get; set; }
public sbyte Level { get; set; }
public System.DateTime CreateTime { get; set; }
}
}

View File

@@ -0,0 +1,29 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Cowain.Bake.Model
{
using System;
using System.Collections.Generic;
public partial class TMenuInfo
{
public int Id { get; set; }
public string Header { get; set; }
public string HeaderName { get; set; }
public string TargetView { get; set; }
public int ParentId { get; set; }
public string MenuIcon { get; set; }
public int MenuIndex { get; set; }
public int MenuType { get; set; }
public Nullable<bool> State { get; set; }
public string JSON { get; set; }
public byte[] MenuImage { get; set; }
}
}

View File

@@ -0,0 +1,27 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Cowain.Bake.Model
{
using System;
using System.Collections.Generic;
public partial class TMesData
{
public int Id { get; set; }
public string CommandType { get; set; }
public string Content { get; set; }
public string RecvContent { get; set; }
public System.DateTime CreateTime { get; set; }
public Nullable<System.DateTime> SendTime { get; set; }
public sbyte SendFlag { get; set; }
public Nullable<System.DateTime> RecvTime { get; set; }
public Nullable<sbyte> MsgType { get; set; }
}
}

View File

@@ -0,0 +1,42 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Cowain.Bake.Model
{
using System;
using System.Collections.Generic;
public partial class TPalletInfo
{
public int Id { get; set; }
public int VirtualId { get; set; }
public string PalletCode { get; set; }
public int PalletStatus { get; set; }
public Nullable<int> BakingPosition { get; set; }
public Nullable<int> LoadingPosition { get; set; }
public Nullable<int> UnLoadingPosition { get; set; }
public int BatteryQty { get; set; }
public int BakingCount { get; set; }
public Nullable<System.DateTime> LoadingBegingTime { get; set; }
public Nullable<System.DateTime> LoadingOverTime { get; set; }
public Nullable<System.DateTime> InStoveTime { get; set; }
public Nullable<System.DateTime> BakingBeginTime { get; set; }
public Nullable<System.DateTime> BakingOverTime { get; set; }
public Nullable<System.DateTime> OutStoveTime { get; set; }
public Nullable<System.DateTime> UnLoadingBegingTime { get; set; }
public Nullable<System.DateTime> UnLoadingOverTime { get; set; }
public string JobNum { get; set; }
public Nullable<System.DateTime> ScanTime { get; set; }
public Nullable<System.DateTime> CreateTime { get; set; }
public bool LastFlag { get; set; }
public string WaterValue { get; set; }
public Nullable<float> UnLoadingCoolTemp { get; set; }
public Nullable<int> TotalBakingCount { get; set; }
}
}

View File

@@ -0,0 +1,42 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Cowain.Bake.Model
{
using System;
using System.Collections.Generic;
public partial class TPalletInfoHistory
{
public int Id { get; set; }
public int VirtualId { get; set; }
public string PalletCode { get; set; }
public int PalletStatus { get; set; }
public Nullable<int> BakingPosition { get; set; }
public Nullable<int> LoadingPosition { get; set; }
public Nullable<int> UnLoadingPosition { get; set; }
public int BatteryQty { get; set; }
public int BakingCount { get; set; }
public Nullable<System.DateTime> LoadingBegingTime { get; set; }
public Nullable<System.DateTime> LoadingOverTime { get; set; }
public Nullable<System.DateTime> InStoveTime { get; set; }
public Nullable<System.DateTime> BakingBeginTime { get; set; }
public Nullable<System.DateTime> BakingOverTime { get; set; }
public Nullable<System.DateTime> OutStoveTime { get; set; }
public Nullable<System.DateTime> UnLoadingBegingTime { get; set; }
public Nullable<System.DateTime> UnLoadingOverTime { get; set; }
public string JobNum { get; set; }
public Nullable<System.DateTime> ScanTime { get; set; }
public Nullable<System.DateTime> CreateTime { get; set; }
public bool LastFlag { get; set; }
public string WaterValue { get; set; }
public Nullable<float> UnLoadingCoolTemp { get; set; }
public Nullable<int> TotalBakingCount { get; set; }
}
}

View File

@@ -0,0 +1,23 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Cowain.Bake.Model
{
using System;
using System.Collections.Generic;
public partial class TProcessParameter
{
public int Id { get; set; }
public string ProcessParamName { get; set; }
public string Parameters { get; set; }
public Nullable<bool> BaseFalg { get; set; }
public Nullable<System.DateTime> CreateTime { get; set; }
}
}

View File

@@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Cowain.Bake.Model
{
using System;
using System.Collections.Generic;
public partial class TProductionInformation
{
public int Id { get; set; }
public string JobNum { get; set; }
public Nullable<System.DateTime> ProductionDatetime { get; set; }
public Nullable<bool> CurrentProduct { get; set; }
public sbyte DummyRule { get; set; }
public int ProcessParamId { get; set; }
public int ReProcessParamId { get; set; }
}
}

View File

@@ -0,0 +1,22 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Cowain.Bake.Model
{
using System;
using System.Collections.Generic;
public partial class TRgvAction
{
public int Id { get; set; }
public string Name { get; set; }
public string Desc { get; set; }
public sbyte StepId { get; set; }
}
}

View File

@@ -0,0 +1,23 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Cowain.Bake.Model
{
using System;
using System.Collections.Generic;
public partial class TRoleInfo
{
public int RoleId { get; set; }
public string RoleName { get; set; }
public Nullable<bool> State { get; set; }
public string Role { get; set; }
public string AccessNode { get; set; }
}
}

View File

@@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Cowain.Bake.Model
{
using System;
using System.Collections.Generic;
public partial class TStation
{
public int Id { get; set; }
public string Name { get; set; }
public string Desc { get; set; }
public sbyte Layers { get; set; }
public sbyte Columns { get; set; }
public sbyte Number { get; set; }
public sbyte Type { get; set; }
public int PosX { get; set; }
public int PosY { get; set; }
public int LeftMargin { get; set; }
public bool Enable { get; set; }
public sbyte DeviceId { get; set; }
}
}

View File

@@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Cowain.Bake.Model
{
using System;
using System.Collections.Generic;
public partial class TStoveSctualPatrol
{
public int Id { get; set; }
public int PalletVirtualId { get; set; }
public int CavityId { get; set; }
public string PalletCode { get; set; }
public float Vacuum { get; set; }
public string Temperature { get; set; }
public string PID { get; set; }
public Nullable<System.DateTime> CreateTime { get; set; }
}
}

View File

@@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Cowain.Bake.Model
{
using System;
using System.Collections.Generic;
public partial class TSysSetup
{
public long Id { get; set; }
public string ParamCode { get; set; }
public string ParamName { get; set; }
public string ParamValue { get; set; }
public string CheckRegular { get; set; }
public sbyte Type { get; set; }
}
}

View File

@@ -0,0 +1,32 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Cowain.Bake.Model
{
using System;
using System.Collections.Generic;
public partial class TTagList
{
public long Id { get; set; }
public string StationIds { get; set; }
public string Address { get; set; }
public string VarName { get; set; }
public string ParamName { get; set; }
public string VarType { get; set; }
public int ArrayLen { get; set; }
public int Number { get; set; }
public Nullable<sbyte> OperType { get; set; }
public string VarDesc { get; set; }
public string Json { get; set; }
public bool TirgEnable { get; set; }
public string TrigJson { get; set; }
public int TagType { get; set; }
}
}

View File

@@ -0,0 +1,28 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Cowain.Bake.Model
{
using System;
using System.Collections.Generic;
public partial class TTaskRecord
{
public int Id { get; set; }
public int PalletId { get; set; }
public int TaskTypeId { get; set; }
public int Source { get; set; }
public int Target { get; set; }
public int Status { get; set; }
public System.DateTime BuildTime { get; set; }
public Nullable<System.DateTime> StartTime { get; set; }
public Nullable<System.DateTime> EndTime { get; set; }
public sbyte StepId { get; set; }
}
}

View File

@@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Cowain.Bake.Model
{
using System;
using System.Collections.Generic;
public partial class TTaskStep
{
public int Id { get; set; }
public int TaskRecordId { get; set; }
public Nullable<int> Count { get; set; }
public sbyte StepId { get; set; }
public Nullable<System.DateTime> StartTime { get; set; }
public Nullable<System.DateTime> EndTime { get; set; }
}
}

View File

@@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Cowain.Bake.Model
{
using System;
using System.Collections.Generic;
public partial class TTaskType
{
public int Id { get; set; }
public string Name { get; set; }
public int SourceDeviceType { get; set; }
public int TargetDeviceType { get; set; }
public int PalletStatus { get; set; }
public int Priority { get; set; }
public bool Enable { get; set; }
public string Json { get; set; }
}
}

View File

@@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码已从模板生成。
//
// 手动更改此文件可能导致应用程序出现意外的行为。
// 如果重新生成代码,将覆盖对此文件的手动更改。
// </auto-generated>
//------------------------------------------------------------------------------
namespace Cowain.Bake.Model
{
using System;
using System.Collections.Generic;
public partial class TUserManage
{
public int Id { get; set; }
public string UserName { get; set; }
public string Password { get; set; }
public int RoleId { get; set; }
public string UserId { get; set; }
public Nullable<bool> Valid { get; set; }
}
}

Binary file not shown.

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<entityFramework>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.EntityFramework, Version=8.0.28.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"></provider>
</providers>
</entityFramework>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<connectionStrings>
<add name="PreheatEntities" connectionString="metadata=res://*/DBMappering.csdl|res://*/DBMappering.ssdl|res://*/DBMappering.msl;provider=MySql.Data.MySqlClient;provider connection string=&quot;server=127.0.0.1;user id=root;database=6098-5;persistsecurityinfo=True&quot;" providerName="System.Data.EntityClient" />
</connectionStrings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>

View File

@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]

View File

@@ -0,0 +1,110 @@
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\Cowain.Bake.Model.dll.config
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\Cowain.Bake.Model.dll
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\Cowain.Bake.Model.pdb
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\EntityFramework.dll
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\EntityFramework.SqlServer.dll
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\Google.Protobuf.dll
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\K4os.Compression.LZ4.dll
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\K4os.Compression.LZ4.Streams.dll
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\K4os.Hash.xxHash.dll
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\Microsoft.Bcl.AsyncInterfaces.dll
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\Microsoft.Xaml.Behaviors.dll
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\MySql.Data.dll
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\MySql.Data.EntityFramework.dll
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\Newtonsoft.Json.dll
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\Prism.dll
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\Prism.Unity.Wpf.dll
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\Prism.Wpf.dll
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\System.Buffers.dll
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\System.Memory.dll
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\System.Numerics.Vectors.dll
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\System.Runtime.CompilerServices.Unsafe.dll
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\System.Text.Encodings.Web.dll
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\System.Text.Json.dll
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\System.Threading.Tasks.Extensions.dll
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\System.ValueTuple.dll
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\Ubiety.Dns.Core.dll
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\ZstdNet.dll
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\BouncyCastle.Crypto.dll
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\Unity.Abstractions.dll
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\Unity.Container.dll
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\EntityFramework.xml
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\EntityFramework.SqlServer.xml
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\Google.Protobuf.pdb
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\Google.Protobuf.xml
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\K4os.Compression.LZ4.xml
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\K4os.Compression.LZ4.Streams.xml
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\K4os.Hash.xxHash.xml
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\Microsoft.Bcl.AsyncInterfaces.xml
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\Microsoft.Xaml.Behaviors.pdb
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\Microsoft.Xaml.Behaviors.xml
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\MySql.Data.xml
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\MySql.Data.EntityFramework.xml
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\Newtonsoft.Json.xml
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\System.Buffers.xml
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\System.Memory.xml
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\System.Numerics.Vectors.xml
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\System.Runtime.CompilerServices.Unsafe.xml
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\System.Text.Encodings.Web.xml
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\System.Text.Json.xml
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\System.Threading.Tasks.Extensions.xml
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\bin\Debug\System.ValueTuple.xml
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\obj\Debug\Cowain.Bake.Model.csproj.CoreCompileInputs.cache
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\obj\Debug\Cowain.Bake.Model.csproj.CopyComplete
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\obj\Debug\Cowain.Bake.Model.dll
E:\svn\DryingStove\branch\得壹烘烤线6098-006\src1111\src\Cowain.Bake.Model\obj\Debug\Cowain.Bake.Model.pdb
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\Cowain.Bake.Model.dll.config
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\Cowain.Bake.Model.dll
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\Cowain.Bake.Model.pdb
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\EntityFramework.dll
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\EntityFramework.SqlServer.dll
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\Google.Protobuf.dll
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\K4os.Compression.LZ4.dll
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\K4os.Compression.LZ4.Streams.dll
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\K4os.Hash.xxHash.dll
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\Microsoft.Bcl.AsyncInterfaces.dll
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\Microsoft.Xaml.Behaviors.dll
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\MySql.Data.dll
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\MySql.Data.EntityFramework.dll
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\Newtonsoft.Json.dll
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\Prism.dll
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\Prism.Unity.Wpf.dll
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\Prism.Wpf.dll
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\System.Buffers.dll
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\System.Memory.dll
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\System.Numerics.Vectors.dll
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\System.Runtime.CompilerServices.Unsafe.dll
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\System.Text.Encodings.Web.dll
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\System.Text.Json.dll
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\System.Threading.Tasks.Extensions.dll
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\System.ValueTuple.dll
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\Ubiety.Dns.Core.dll
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\ZstdNet.dll
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\BouncyCastle.Crypto.dll
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\Unity.Abstractions.dll
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\Unity.Container.dll
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\EntityFramework.xml
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\EntityFramework.SqlServer.xml
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\Google.Protobuf.pdb
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\Google.Protobuf.xml
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\K4os.Compression.LZ4.xml
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\K4os.Compression.LZ4.Streams.xml
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\K4os.Hash.xxHash.xml
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\Microsoft.Bcl.AsyncInterfaces.xml
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\Microsoft.Xaml.Behaviors.pdb
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\Microsoft.Xaml.Behaviors.xml
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\MySql.Data.xml
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\MySql.Data.EntityFramework.xml
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\Newtonsoft.Json.xml
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\System.Buffers.xml
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\System.Memory.xml
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\System.Numerics.Vectors.xml
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\System.Runtime.CompilerServices.Unsafe.xml
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\System.Text.Encodings.Web.xml
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\System.Text.Json.xml
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\System.Threading.Tasks.Extensions.xml
D:\SourceCode\src\Cowain.Bake.Model\bin\Debug\System.ValueTuple.xml
D:\SourceCode\src\Cowain.Bake.Model\obj\Debug\Cowain.Bake.Model.csproj.CoreCompileInputs.cache
D:\SourceCode\src\Cowain.Bake.Model\obj\Debug\Cowain.Bake.Model.csproj.CopyComplete
D:\SourceCode\src\Cowain.Bake.Model\obj\Debug\Cowain.Bake.Model.dll
D:\SourceCode\src\Cowain.Bake.Model\obj\Debug\Cowain.Bake.Model.pdb

Binary file not shown.

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="BouncyCastle" version="1.8.5" targetFramework="net472" />
<package id="EntityFramework" version="6.4.4" targetFramework="net472" />
<package id="EntityFramework.zh-Hans" version="6.2.0" targetFramework="net472" />
<package id="Google.Protobuf" version="3.14.0" targetFramework="net472" />
<package id="K4os.Compression.LZ4" version="1.2.6" targetFramework="net472" />
<package id="K4os.Compression.LZ4.Streams" version="1.2.6" targetFramework="net472" />
<package id="K4os.Hash.xxHash" version="1.0.6" targetFramework="net472" />
<package id="Microsoft.Bcl.AsyncInterfaces" version="7.0.0" targetFramework="net472" />
<package id="Microsoft.Xaml.Behaviors.Wpf" version="1.1.31" targetFramework="net472" />
<package id="MySql.Data" version="8.0.28" targetFramework="net472" />
<package id="MySql.Data.EntityFramework" version="8.0.28" targetFramework="net472" />
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net472" />
<package id="Prism.Core" version="8.1.97" targetFramework="net472" />
<package id="Prism.Unity" version="8.1.97" targetFramework="net472" />
<package id="Prism.Wpf" version="8.1.97" targetFramework="net472" />
<package id="System.Buffers" version="4.5.1" targetFramework="net472" />
<package id="System.Memory" version="4.5.5" targetFramework="net472" />
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net472" />
<package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net472" />
<package id="System.Text.Encodings.Web" version="7.0.0" targetFramework="net472" />
<package id="System.Text.Json" version="7.0.2" targetFramework="net472" />
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net472" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net472" />
<package id="Unity.Abstractions" version="5.11.7" targetFramework="net472" />
<package id="Unity.Container" version="5.11.11" targetFramework="net472" />
</packages>