Aggiunta migration x Alias
This commit is contained in:
@@ -80,16 +80,21 @@ namespace EgtBEAMWALL.DataLayer
|
||||
/// </summary>
|
||||
public DbSet<StatusMapModel> StatusMapList { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Wharehouse materials management
|
||||
/// </summary>
|
||||
public DbSet<MaterialModel> MaterialsList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Wharehouse items management
|
||||
/// </summary>
|
||||
public DbSet<RawItemModel> RawItemList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Alias management
|
||||
/// </summary>
|
||||
public DbSet<AliasModel> AliasList { get; set; }
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Public Methods
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EgtBEAMWALL.DataLayer.DatabaseModels
|
||||
{
|
||||
public class AliasModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Famiglia di sinonimi
|
||||
/// </summary>
|
||||
[Column("Family", Order = 1), Key]
|
||||
public string Family { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Codice originale (da trasformare)
|
||||
/// </summary>
|
||||
[Column("ValueOriginal", Order = 2), Key]
|
||||
public string ValueOriginal { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Codice Alias <inheritdoccui viene convertito/>
|
||||
/// </summary>
|
||||
public string ValueAlias { get; set; } = "";
|
||||
}
|
||||
}
|
||||
@@ -126,6 +126,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="AdminContext.cs" />
|
||||
<Compile Include="DatabaseModels\AliasModel.cs" />
|
||||
<Compile Include="DatabaseModels\MaterialModel.cs" />
|
||||
<Compile Include="DatabaseModels\RawItemModel.cs" />
|
||||
<Compile Include="DatabaseModels\UserPrivModel.cs" />
|
||||
@@ -193,6 +194,10 @@
|
||||
<Compile Include="Migrations\202401181206504_AddMaterialAndRawItems.designer.cs">
|
||||
<DependentUpon>202401181206504_AddMaterialAndRawItems.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Migrations\202401181425519_AddAliasModel.cs" />
|
||||
<Compile Include="Migrations\202401181425519_AddAliasModel.designer.cs">
|
||||
<DependentUpon>202401181425519_AddAliasModel.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Migrations\Configuration.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Utils.cs" />
|
||||
@@ -244,6 +249,9 @@
|
||||
<EmbeddedResource Include="Migrations\202401181206504_AddMaterialAndRawItems.resx">
|
||||
<DependentUpon>202401181206504_AddMaterialAndRawItems.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Migrations\202401181425519_AddAliasModel.resx">
|
||||
<DependentUpon>202401181425519_AddAliasModel.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
// <auto-generated />
|
||||
namespace EgtBEAMWALL.DataLayer.Migrations
|
||||
{
|
||||
using System.CodeDom.Compiler;
|
||||
using System.Data.Entity.Migrations;
|
||||
using System.Data.Entity.Migrations.Infrastructure;
|
||||
using System.Resources;
|
||||
|
||||
[GeneratedCode("EntityFramework.Migrations", "6.4.4")]
|
||||
public sealed partial class AddAliasModel : IMigrationMetadata
|
||||
{
|
||||
private readonly ResourceManager Resources = new ResourceManager(typeof(AddAliasModel));
|
||||
|
||||
string IMigrationMetadata.Id
|
||||
{
|
||||
get { return "202401181425519_AddAliasModel"; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Source
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Target
|
||||
{
|
||||
get { return Resources.GetString("Target"); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
namespace EgtBEAMWALL.DataLayer.Migrations
|
||||
{
|
||||
using System;
|
||||
using System.Data.Entity.Migrations;
|
||||
|
||||
public partial class AddAliasModel : DbMigration
|
||||
{
|
||||
public override void Up()
|
||||
{
|
||||
CreateTable(
|
||||
"dbo.AliasModels",
|
||||
c => new
|
||||
{
|
||||
Family = c.String(nullable: false, maxLength: 128, storeType: "nvarchar"),
|
||||
ValueOriginal = c.String(nullable: false, maxLength: 128, storeType: "nvarchar"),
|
||||
ValueAlias = c.String(unicode: false),
|
||||
})
|
||||
.PrimaryKey(t => new { t.Family, t.ValueOriginal });
|
||||
|
||||
}
|
||||
|
||||
public override void Down()
|
||||
{
|
||||
DropTable("dbo.AliasModels");
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user