Completato migrations + aggiornamento modello x negoziazioni con Company gestita
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<UserSecretsId>60fcdaab-6c1e-4bec-9d88-f7727ef1c12c</UserSecretsId>
|
||||
<ApplicationIcon>wwwroot\favicon.ico</ApplicationIcon>
|
||||
<Version>1.0.2106.1713</Version>
|
||||
<Version>1.0.2106.1714</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -20,11 +20,11 @@ namespace SHERPA.BBM.DatabaseModels
|
||||
[Column("CodNegotiation", Order = 1), MaxLength(50)]
|
||||
public string CodNegotiation { get; set; } = "EGW.0000.0000";
|
||||
|
||||
//[ForeignKey("CompanyId")]
|
||||
//public virtual CompanyModel Company { get; set; }
|
||||
[ForeignKey("CompanyId")]
|
||||
public virtual CompanyModel Company { get; set; }
|
||||
|
||||
//[Column("CompanyId", Order = 7)]
|
||||
//public int CompanyId { get; set; } = 0;
|
||||
[Column("CompanyId", Order = 7)]
|
||||
public int CompanyId { get; set; } = 1;
|
||||
|
||||
[ForeignKey("CustomerId")]
|
||||
public virtual CustomersModel Customer { get; set; }
|
||||
|
||||
@@ -1,545 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using System.Data.Entity.Infrastructure.MappingViews;
|
||||
|
||||
[assembly: DbMappingViewCacheTypeAttribute(
|
||||
typeof(SHERPA.BBM.MainDbContext),
|
||||
typeof(Edm_EntityMappingGeneratedViews.ViewsForBaseEntitySets2bb14b04a626cfa167c25e0a078e7ba1e54b3a61e82e0b3ba0dceb18b5f27cbb))]
|
||||
|
||||
namespace Edm_EntityMappingGeneratedViews
|
||||
{
|
||||
using System;
|
||||
using System.CodeDom.Compiler;
|
||||
using System.Data.Entity.Core.Metadata.Edm;
|
||||
|
||||
/// <summary>
|
||||
/// Implements a mapping view cache.
|
||||
/// </summary>
|
||||
[GeneratedCode("Entity Framework 6 Power Tools", "0.9.2.0")]
|
||||
internal sealed class ViewsForBaseEntitySets2bb14b04a626cfa167c25e0a078e7ba1e54b3a61e82e0b3ba0dceb18b5f27cbb : DbMappingViewCache
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets a hash value computed over the mapping closure.
|
||||
/// </summary>
|
||||
public override string MappingHashValue
|
||||
{
|
||||
get { return "2bb14b04a626cfa167c25e0a078e7ba1e54b3a61e82e0b3ba0dceb18b5f27cbb"; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a view corresponding to the specified extent.
|
||||
/// </summary>
|
||||
/// <param name="extent">The extent.</param>
|
||||
/// <returns>The mapping view, or null if the extent is not associated with a mapping view.</returns>
|
||||
public override DbMappingView GetView(EntitySetBase extent)
|
||||
{
|
||||
if (extent == null)
|
||||
{
|
||||
throw new ArgumentNullException("extent");
|
||||
}
|
||||
|
||||
var extentName = extent.EntityContainer.Name + "." + extent.Name;
|
||||
|
||||
if (extentName == "CodeFirstDatabase.BasketsModel")
|
||||
{
|
||||
return GetView0();
|
||||
}
|
||||
|
||||
if (extentName == "CodeFirstDatabase.CustomersModel")
|
||||
{
|
||||
return GetView1();
|
||||
}
|
||||
|
||||
if (extentName == "CodeFirstDatabase.DocsModel")
|
||||
{
|
||||
return GetView2();
|
||||
}
|
||||
|
||||
if (extentName == "CodeFirstDatabase.NegotiationsModel")
|
||||
{
|
||||
return GetView3();
|
||||
}
|
||||
|
||||
if (extentName == "CodeFirstDatabase.Fatt2DocModel")
|
||||
{
|
||||
return GetView4();
|
||||
}
|
||||
|
||||
if (extentName == "CodeFirstDatabase.ItemsModel")
|
||||
{
|
||||
return GetView5();
|
||||
}
|
||||
|
||||
if (extentName == "CodeFirstDatabase.ResourcesModel")
|
||||
{
|
||||
return GetView6();
|
||||
}
|
||||
|
||||
if (extentName == "MainDbContext.DbSetBaskets")
|
||||
{
|
||||
return GetView7();
|
||||
}
|
||||
|
||||
if (extentName == "MainDbContext.DbSetCustomers")
|
||||
{
|
||||
return GetView8();
|
||||
}
|
||||
|
||||
if (extentName == "MainDbContext.DbSetDocs")
|
||||
{
|
||||
return GetView9();
|
||||
}
|
||||
|
||||
if (extentName == "MainDbContext.DbSetNegotiations")
|
||||
{
|
||||
return GetView10();
|
||||
}
|
||||
|
||||
if (extentName == "MainDbContext.DbSetFatt2Doc")
|
||||
{
|
||||
return GetView11();
|
||||
}
|
||||
|
||||
if (extentName == "MainDbContext.DbSetItems")
|
||||
{
|
||||
return GetView12();
|
||||
}
|
||||
|
||||
if (extentName == "MainDbContext.DbSetResources")
|
||||
{
|
||||
return GetView13();
|
||||
}
|
||||
|
||||
if (extentName == "CodeFirstDatabase.CompanyModel")
|
||||
{
|
||||
return GetView14();
|
||||
}
|
||||
|
||||
if (extentName == "MainDbContext.DbSetCompanies")
|
||||
{
|
||||
return GetView15();
|
||||
}
|
||||
|
||||
if (extentName == "CodeFirstDatabase.FluxCountersModel")
|
||||
{
|
||||
return GetView16();
|
||||
}
|
||||
|
||||
if (extentName == "MainDbContext.DbSetCounters")
|
||||
{
|
||||
return GetView17();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the view for CodeFirstDatabase.BasketsModel.
|
||||
/// </summary>
|
||||
/// <returns>The mapping view.</returns>
|
||||
private static DbMappingView GetView0()
|
||||
{
|
||||
return new DbMappingView(@"
|
||||
SELECT VALUE -- Constructing BasketsModel
|
||||
[CodeFirstDatabaseSchema.BasketsModel](T1.BasketsModel_BasketId, T1.BasketsModel_CodBasket, T1.BasketsModel_DataIns, T1.BasketsModel_Descript, T1.BasketsModel_CustomerId)
|
||||
FROM (
|
||||
SELECT
|
||||
T.BasketId AS BasketsModel_BasketId,
|
||||
T.CodBasket AS BasketsModel_CodBasket,
|
||||
T.DataIns AS BasketsModel_DataIns,
|
||||
T.Descript AS BasketsModel_Descript,
|
||||
T.CustomerId AS BasketsModel_CustomerId,
|
||||
True AS _from0
|
||||
FROM MainDbContext.DbSetBaskets AS T
|
||||
) AS T1");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the view for CodeFirstDatabase.CustomersModel.
|
||||
/// </summary>
|
||||
/// <returns>The mapping view.</returns>
|
||||
private static DbMappingView GetView1()
|
||||
{
|
||||
return new DbMappingView(@"
|
||||
SELECT VALUE -- Constructing CustomersModel
|
||||
[CodeFirstDatabaseSchema.CustomersModel](T1.CustomersModel_CustomerId, T1.CustomersModel_RagSoc, T1.CustomersModel_CF, T1.CustomersModel_PI, T1.CustomersModel_Descript)
|
||||
FROM (
|
||||
SELECT
|
||||
T.CustomerId AS CustomersModel_CustomerId,
|
||||
T.RagSoc AS CustomersModel_RagSoc,
|
||||
T.CF AS CustomersModel_CF,
|
||||
T.PI AS CustomersModel_PI,
|
||||
T.Descript AS CustomersModel_Descript,
|
||||
True AS _from0
|
||||
FROM MainDbContext.DbSetCustomers AS T
|
||||
) AS T1");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the view for CodeFirstDatabase.DocsModel.
|
||||
/// </summary>
|
||||
/// <returns>The mapping view.</returns>
|
||||
private static DbMappingView GetView2()
|
||||
{
|
||||
return new DbMappingView(@"
|
||||
SELECT VALUE -- Constructing DocsModel
|
||||
[CodeFirstDatabaseSchema.DocsModel](T1.DocsModel_DocId, T1.DocsModel_CodDoc, T1.DocsModel_NegotiationId, T1.DocsModel_Descript, T1.DocsModel_NumDoc, T1.DocsModel_DocType, T1.DocsModel_DataIns, T1.DocsModel_BasketId, T1.DocsModel_DocPath, T1.DocsModel_IsActive, T1.DocsModel_Note, T1.DocsModel_IsDraft)
|
||||
FROM (
|
||||
SELECT
|
||||
T.DocId AS DocsModel_DocId,
|
||||
T.CodDoc AS DocsModel_CodDoc,
|
||||
T.NegotiationId AS DocsModel_NegotiationId,
|
||||
T.Descript AS DocsModel_Descript,
|
||||
T.NumDoc AS DocsModel_NumDoc,
|
||||
CAST(T.DocType AS [Edm.Int32]) AS DocsModel_DocType,
|
||||
T.DataIns AS DocsModel_DataIns,
|
||||
T.BasketId AS DocsModel_BasketId,
|
||||
T.DocPath AS DocsModel_DocPath,
|
||||
T.IsActive AS DocsModel_IsActive,
|
||||
T.Note AS DocsModel_Note,
|
||||
T.IsDraft AS DocsModel_IsDraft,
|
||||
True AS _from0
|
||||
FROM MainDbContext.DbSetDocs AS T
|
||||
) AS T1");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the view for CodeFirstDatabase.NegotiationsModel.
|
||||
/// </summary>
|
||||
/// <returns>The mapping view.</returns>
|
||||
private static DbMappingView GetView3()
|
||||
{
|
||||
return new DbMappingView(@"
|
||||
SELECT VALUE -- Constructing NegotiationsModel
|
||||
[CodeFirstDatabaseSchema.NegotiationsModel](T1.NegotiationsModel_NegotiationId, T1.NegotiationsModel_CodNegotiation, T1.NegotiationsModel_DataIns, T1.NegotiationsModel_CustomerId, T1.NegotiationsModel_Descript, T1.NegotiationsModel_Refer, T1.NegotiationsModel_BasePath)
|
||||
FROM (
|
||||
SELECT
|
||||
T.NegotiationId AS NegotiationsModel_NegotiationId,
|
||||
T.CodNegotiation AS NegotiationsModel_CodNegotiation,
|
||||
T.DataIns AS NegotiationsModel_DataIns,
|
||||
T.CustomerId AS NegotiationsModel_CustomerId,
|
||||
T.Descript AS NegotiationsModel_Descript,
|
||||
T.Refer AS NegotiationsModel_Refer,
|
||||
T.BasePath AS NegotiationsModel_BasePath,
|
||||
True AS _from0
|
||||
FROM MainDbContext.DbSetNegotiations AS T
|
||||
) AS T1");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the view for CodeFirstDatabase.Fatt2DocModel.
|
||||
/// </summary>
|
||||
/// <returns>The mapping view.</returns>
|
||||
private static DbMappingView GetView4()
|
||||
{
|
||||
return new DbMappingView(@"
|
||||
SELECT VALUE -- Constructing Fatt2DocModel
|
||||
[CodeFirstDatabaseSchema.Fatt2DocModel](T1.Fatt2DocModel_DocId, T1.Fatt2DocModel_IdxFatt, T1.Fatt2DocModel_DataIns, T1.Fatt2DocModel_Importo, T1.Fatt2DocModel_Incassato, T1.Fatt2DocModel_NumFatt, T1.Fatt2DocModel_AnnoFatt)
|
||||
FROM (
|
||||
SELECT
|
||||
T.DocId AS Fatt2DocModel_DocId,
|
||||
T.IdxFatt AS Fatt2DocModel_IdxFatt,
|
||||
T.DataIns AS Fatt2DocModel_DataIns,
|
||||
T.Importo AS Fatt2DocModel_Importo,
|
||||
T.Incassato AS Fatt2DocModel_Incassato,
|
||||
T.NumFatt AS Fatt2DocModel_NumFatt,
|
||||
T.AnnoFatt AS Fatt2DocModel_AnnoFatt,
|
||||
True AS _from0
|
||||
FROM MainDbContext.DbSetFatt2Doc AS T
|
||||
) AS T1");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the view for CodeFirstDatabase.ItemsModel.
|
||||
/// </summary>
|
||||
/// <returns>The mapping view.</returns>
|
||||
private static DbMappingView GetView5()
|
||||
{
|
||||
return new DbMappingView(@"
|
||||
SELECT VALUE -- Constructing ItemsModel
|
||||
[CodeFirstDatabaseSchema.ItemsModel](T1.ItemsModel_ItemId, T1.ItemsModel_CodItem, T1.ItemsModel_ResType, T1.ItemsModel_UM, T1.ItemsModel_Descript, T1.ItemsModel_UnitCost, T1.ItemsModel_UnitPrice)
|
||||
FROM (
|
||||
SELECT
|
||||
T.ItemId AS ItemsModel_ItemId,
|
||||
T.CodItem AS ItemsModel_CodItem,
|
||||
CAST(T.ResType AS [Edm.Int32]) AS ItemsModel_ResType,
|
||||
T.UM AS ItemsModel_UM,
|
||||
T.Descript AS ItemsModel_Descript,
|
||||
T.UnitCost AS ItemsModel_UnitCost,
|
||||
T.UnitPrice AS ItemsModel_UnitPrice,
|
||||
True AS _from0
|
||||
FROM MainDbContext.DbSetItems AS T
|
||||
) AS T1");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the view for CodeFirstDatabase.ResourcesModel.
|
||||
/// </summary>
|
||||
/// <returns>The mapping view.</returns>
|
||||
private static DbMappingView GetView6()
|
||||
{
|
||||
return new DbMappingView(@"
|
||||
SELECT VALUE -- Constructing ResourcesModel
|
||||
[CodeFirstDatabaseSchema.ResourcesModel](T1.ResourcesModel_ResourceId, T1.ResourcesModel_DocId, T1.ResourcesModel_Ordinal, T1.ResourcesModel_ItemId, T1.ResourcesModel_QtyPrev, T1.ResourcesModel_QtyOff, T1.ResourcesModel_UnitPriceOff, T1.ResourcesModel_FinaPrice, T1.ResourcesModel_Note)
|
||||
FROM (
|
||||
SELECT
|
||||
T.ResourceId AS ResourcesModel_ResourceId,
|
||||
T.DocId AS ResourcesModel_DocId,
|
||||
T.Ordinal AS ResourcesModel_Ordinal,
|
||||
T.ItemId AS ResourcesModel_ItemId,
|
||||
T.QtyPrev AS ResourcesModel_QtyPrev,
|
||||
T.QtyOff AS ResourcesModel_QtyOff,
|
||||
T.UnitPriceOff AS ResourcesModel_UnitPriceOff,
|
||||
T.FinalPrice AS ResourcesModel_FinaPrice,
|
||||
T.Note AS ResourcesModel_Note,
|
||||
True AS _from0
|
||||
FROM MainDbContext.DbSetResources AS T
|
||||
) AS T1");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the view for MainDbContext.DbSetBaskets.
|
||||
/// </summary>
|
||||
/// <returns>The mapping view.</returns>
|
||||
private static DbMappingView GetView7()
|
||||
{
|
||||
return new DbMappingView(@"
|
||||
SELECT VALUE -- Constructing DbSetBaskets
|
||||
[SHERPA.BBM.BasketsModel](T1.BasketsModel_BasketId, T1.BasketsModel_CodBasket, T1.BasketsModel_CustomerId, T1.BasketsModel_DataIns, T1.BasketsModel_Descript)
|
||||
FROM (
|
||||
SELECT
|
||||
T.BasketId AS BasketsModel_BasketId,
|
||||
T.CodBasket AS BasketsModel_CodBasket,
|
||||
T.CustomerId AS BasketsModel_CustomerId,
|
||||
T.DataIns AS BasketsModel_DataIns,
|
||||
T.Descript AS BasketsModel_Descript,
|
||||
True AS _from0
|
||||
FROM CodeFirstDatabase.BasketsModel AS T
|
||||
) AS T1");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the view for MainDbContext.DbSetCustomers.
|
||||
/// </summary>
|
||||
/// <returns>The mapping view.</returns>
|
||||
private static DbMappingView GetView8()
|
||||
{
|
||||
return new DbMappingView(@"
|
||||
SELECT VALUE -- Constructing DbSetCustomers
|
||||
[SHERPA.BBM.CustomersModel](T1.CustomersModel_CustomerId, T1.CustomersModel_CF, T1.CustomersModel_Descript, T1.CustomersModel_PI, T1.CustomersModel_RagSoc)
|
||||
FROM (
|
||||
SELECT
|
||||
T.CustomerId AS CustomersModel_CustomerId,
|
||||
T.CF AS CustomersModel_CF,
|
||||
T.Descript AS CustomersModel_Descript,
|
||||
T.PI AS CustomersModel_PI,
|
||||
T.RagSoc AS CustomersModel_RagSoc,
|
||||
True AS _from0
|
||||
FROM CodeFirstDatabase.CustomersModel AS T
|
||||
) AS T1");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the view for MainDbContext.DbSetDocs.
|
||||
/// </summary>
|
||||
/// <returns>The mapping view.</returns>
|
||||
private static DbMappingView GetView9()
|
||||
{
|
||||
return new DbMappingView(@"
|
||||
SELECT VALUE -- Constructing DbSetDocs
|
||||
[SHERPA.BBM.DocsModel](T1.DocsModel_DocId, T1.DocsModel_BasketId, T1.DocsModel_CodDoc, T1.DocsModel_DataIns, T1.DocsModel_Descript, T1.DocsModel_DocPath, T1.DocsModel_DocType, T1.DocsModel_IsActive, T1.DocsModel_IsDraft, T1.DocsModel_NegotiationId, T1.DocsModel_Note, T1.DocsModel_NumDoc)
|
||||
FROM (
|
||||
SELECT
|
||||
T.DocId AS DocsModel_DocId,
|
||||
T.BasketId AS DocsModel_BasketId,
|
||||
T.CodDoc AS DocsModel_CodDoc,
|
||||
T.DataIns AS DocsModel_DataIns,
|
||||
T.Descript AS DocsModel_Descript,
|
||||
T.DocPath AS DocsModel_DocPath,
|
||||
CAST(T.DocType AS [SHERPA.BBM.BbmDocType]) AS DocsModel_DocType,
|
||||
T.IsActive AS DocsModel_IsActive,
|
||||
T.IsDraft AS DocsModel_IsDraft,
|
||||
T.NegotiationId AS DocsModel_NegotiationId,
|
||||
T.Note AS DocsModel_Note,
|
||||
T.NumDoc AS DocsModel_NumDoc,
|
||||
True AS _from0
|
||||
FROM CodeFirstDatabase.DocsModel AS T
|
||||
) AS T1");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the view for MainDbContext.DbSetNegotiations.
|
||||
/// </summary>
|
||||
/// <returns>The mapping view.</returns>
|
||||
private static DbMappingView GetView10()
|
||||
{
|
||||
return new DbMappingView(@"
|
||||
SELECT VALUE -- Constructing DbSetNegotiations
|
||||
[SHERPA.BBM.NegotiationsModel](T1.NegotiationsModel_NegotiationId, T1.NegotiationsModel_BasePath, T1.NegotiationsModel_CodNegotiation, T1.NegotiationsModel_CustomerId, T1.NegotiationsModel_DataIns, T1.NegotiationsModel_Descript, T1.NegotiationsModel_Refer)
|
||||
FROM (
|
||||
SELECT
|
||||
T.NegotiationId AS NegotiationsModel_NegotiationId,
|
||||
T.BasePath AS NegotiationsModel_BasePath,
|
||||
T.CodNegotiation AS NegotiationsModel_CodNegotiation,
|
||||
T.CustomerId AS NegotiationsModel_CustomerId,
|
||||
T.DataIns AS NegotiationsModel_DataIns,
|
||||
T.Descript AS NegotiationsModel_Descript,
|
||||
T.Refer AS NegotiationsModel_Refer,
|
||||
True AS _from0
|
||||
FROM CodeFirstDatabase.NegotiationsModel AS T
|
||||
) AS T1");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the view for MainDbContext.DbSetFatt2Doc.
|
||||
/// </summary>
|
||||
/// <returns>The mapping view.</returns>
|
||||
private static DbMappingView GetView11()
|
||||
{
|
||||
return new DbMappingView(@"
|
||||
SELECT VALUE -- Constructing DbSetFatt2Doc
|
||||
[SHERPA.BBM.Fatt2DocModel](T1.Fatt2DocModel_DocId, T1.Fatt2DocModel_IdxFatt, T1.Fatt2DocModel_DataIns, T1.Fatt2DocModel_AnnoFatt, T1.Fatt2DocModel_Importo, T1.Fatt2DocModel_Incassato, T1.Fatt2DocModel_NumFatt)
|
||||
FROM (
|
||||
SELECT
|
||||
T.DocId AS Fatt2DocModel_DocId,
|
||||
T.IdxFatt AS Fatt2DocModel_IdxFatt,
|
||||
T.DataIns AS Fatt2DocModel_DataIns,
|
||||
T.AnnoFatt AS Fatt2DocModel_AnnoFatt,
|
||||
T.Importo AS Fatt2DocModel_Importo,
|
||||
T.Incassato AS Fatt2DocModel_Incassato,
|
||||
T.NumFatt AS Fatt2DocModel_NumFatt,
|
||||
True AS _from0
|
||||
FROM CodeFirstDatabase.Fatt2DocModel AS T
|
||||
) AS T1");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the view for MainDbContext.DbSetItems.
|
||||
/// </summary>
|
||||
/// <returns>The mapping view.</returns>
|
||||
private static DbMappingView GetView12()
|
||||
{
|
||||
return new DbMappingView(@"
|
||||
SELECT VALUE -- Constructing DbSetItems
|
||||
[SHERPA.BBM.ItemsModel](T1.ItemsModel_ItemId, T1.ItemsModel_CodItem, T1.ItemsModel_Descript, T1.ItemsModel_ResType, T1.ItemsModel_UM, T1.ItemsModel_UnitCost, T1.ItemsModel_UnitPrice)
|
||||
FROM (
|
||||
SELECT
|
||||
T.ItemId AS ItemsModel_ItemId,
|
||||
T.CodItem AS ItemsModel_CodItem,
|
||||
T.Descript AS ItemsModel_Descript,
|
||||
CAST(T.ResType AS [SHERPA.BBM.BbmResType]) AS ItemsModel_ResType,
|
||||
T.UM AS ItemsModel_UM,
|
||||
T.UnitCost AS ItemsModel_UnitCost,
|
||||
T.UnitPrice AS ItemsModel_UnitPrice,
|
||||
True AS _from0
|
||||
FROM CodeFirstDatabase.ItemsModel AS T
|
||||
) AS T1");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the view for MainDbContext.DbSetResources.
|
||||
/// </summary>
|
||||
/// <returns>The mapping view.</returns>
|
||||
private static DbMappingView GetView13()
|
||||
{
|
||||
return new DbMappingView(@"
|
||||
SELECT VALUE -- Constructing DbSetResources
|
||||
[SHERPA.BBM.ResourcesModel](T1.ResourcesModel_ResourceId, T1.ResourcesModel_DocId, T1.ResourcesModel_FinalPrice, T1.ResourcesModel_ItemId, T1.ResourcesModel_Note, T1.ResourcesModel_Ordinal, T1.ResourcesModel_QtyOff, T1.ResourcesModel_QtyPrev, T1.ResourcesModel_UnitPriceOff)
|
||||
FROM (
|
||||
SELECT
|
||||
T.ResourceId AS ResourcesModel_ResourceId,
|
||||
T.DocId AS ResourcesModel_DocId,
|
||||
T.FinaPrice AS ResourcesModel_FinalPrice,
|
||||
T.ItemId AS ResourcesModel_ItemId,
|
||||
T.Note AS ResourcesModel_Note,
|
||||
T.Ordinal AS ResourcesModel_Ordinal,
|
||||
T.QtyOff AS ResourcesModel_QtyOff,
|
||||
T.QtyPrev AS ResourcesModel_QtyPrev,
|
||||
T.UnitPriceOff AS ResourcesModel_UnitPriceOff,
|
||||
True AS _from0
|
||||
FROM CodeFirstDatabase.ResourcesModel AS T
|
||||
) AS T1");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the view for CodeFirstDatabase.CompanyModel.
|
||||
/// </summary>
|
||||
/// <returns>The mapping view.</returns>
|
||||
private static DbMappingView GetView14()
|
||||
{
|
||||
return new DbMappingView(@"
|
||||
SELECT VALUE -- Constructing CompanyModel
|
||||
[CodeFirstDatabaseSchema.CompanyModel](T1.CompanyModel_CompanyId, T1.CompanyModel_CodCompany, T1.CompanyModel_Descript)
|
||||
FROM (
|
||||
SELECT
|
||||
T.CompanyId AS CompanyModel_CompanyId,
|
||||
T.CodCompany AS CompanyModel_CodCompany,
|
||||
T.Descript AS CompanyModel_Descript,
|
||||
True AS _from0
|
||||
FROM MainDbContext.DbSetCompanies AS T
|
||||
) AS T1");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the view for MainDbContext.DbSetCompanies.
|
||||
/// </summary>
|
||||
/// <returns>The mapping view.</returns>
|
||||
private static DbMappingView GetView15()
|
||||
{
|
||||
return new DbMappingView(@"
|
||||
SELECT VALUE -- Constructing DbSetCompanies
|
||||
[SHERPA.BBM.CompanyModel](T1.CompanyModel_CompanyId, T1.CompanyModel_CodCompany, T1.CompanyModel_Descript)
|
||||
FROM (
|
||||
SELECT
|
||||
T.CompanyId AS CompanyModel_CompanyId,
|
||||
T.CodCompany AS CompanyModel_CodCompany,
|
||||
T.Descript AS CompanyModel_Descript,
|
||||
True AS _from0
|
||||
FROM CodeFirstDatabase.CompanyModel AS T
|
||||
) AS T1");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the view for CodeFirstDatabase.FluxCountersModel.
|
||||
/// </summary>
|
||||
/// <returns>The mapping view.</returns>
|
||||
private static DbMappingView GetView16()
|
||||
{
|
||||
return new DbMappingView(@"
|
||||
SELECT VALUE -- Constructing FluxCountersModel
|
||||
[CodeFirstDatabaseSchema.FluxCountersModel](T1.FluxCountersModel_CodCounter, T1.FluxCountersModel_LastNum)
|
||||
FROM (
|
||||
SELECT
|
||||
T.CodCounter AS FluxCountersModel_CodCounter,
|
||||
T.LastNum AS FluxCountersModel_LastNum,
|
||||
True AS _from0
|
||||
FROM MainDbContext.DbSetCounters AS T
|
||||
) AS T1");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the view for MainDbContext.DbSetCounters.
|
||||
/// </summary>
|
||||
/// <returns>The mapping view.</returns>
|
||||
private static DbMappingView GetView17()
|
||||
{
|
||||
return new DbMappingView(@"
|
||||
SELECT VALUE -- Constructing DbSetCounters
|
||||
[SHERPA.BBM.FluxCountersModel](T1.FluxCountersModel_CodCounter, T1.FluxCountersModel_LastNum)
|
||||
FROM (
|
||||
SELECT
|
||||
T.CodCounter AS FluxCountersModel_CodCounter,
|
||||
T.LastNum AS FluxCountersModel_LastNum,
|
||||
True AS _from0
|
||||
FROM CodeFirstDatabase.FluxCountersModel AS T
|
||||
) AS T1");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
// <auto-generated />
|
||||
namespace SHERPA.BBM.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 UpdNegotiations01 : IMigrationMetadata
|
||||
{
|
||||
private readonly ResourceManager Resources = new ResourceManager(typeof(UpdNegotiations01));
|
||||
|
||||
string IMigrationMetadata.Id
|
||||
{
|
||||
get { return "202106171238132_UpdNegotiations01"; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Source
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Target
|
||||
{
|
||||
get { return Resources.GetString("Target"); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
namespace SHERPA.BBM.Migrations
|
||||
{
|
||||
using System;
|
||||
using System.Data.Entity.Migrations;
|
||||
|
||||
public partial class UpdNegotiations01 : DbMigration
|
||||
{
|
||||
public override void Up()
|
||||
{
|
||||
AddColumn("dbo.Negotiations", "CompanyId", c => c.Int(nullable: false));
|
||||
}
|
||||
|
||||
public override void Down()
|
||||
{
|
||||
DropColumn("dbo.Negotiations", "CompanyId");
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,29 @@
|
||||
// <auto-generated />
|
||||
namespace SHERPA.BBM.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 UpdNegotiations02 : IMigrationMetadata
|
||||
{
|
||||
private readonly ResourceManager Resources = new ResourceManager(typeof(UpdNegotiations02));
|
||||
|
||||
string IMigrationMetadata.Id
|
||||
{
|
||||
get { return "202106171241509_UpdNegotiations02"; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Source
|
||||
{
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
string IMigrationMetadata.Target
|
||||
{
|
||||
get { return Resources.GetString("Target"); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
namespace SHERPA.BBM.Migrations
|
||||
{
|
||||
using System;
|
||||
using System.Data.Entity.Migrations;
|
||||
|
||||
public partial class UpdNegotiations02 : DbMigration
|
||||
{
|
||||
public override void Up()
|
||||
{
|
||||
CreateIndex("dbo.Negotiations", "CompanyId");
|
||||
AddForeignKey("dbo.Negotiations", "CompanyId", "dbo.Company", "CompanyId", cascadeDelete: true);
|
||||
}
|
||||
|
||||
public override void Down()
|
||||
{
|
||||
DropForeignKey("dbo.Negotiations", "CompanyId", "dbo.Company");
|
||||
DropIndex("dbo.Negotiations", new[] { "CompanyId" });
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -35,7 +35,10 @@ namespace SHERPA.BBM.Migrations
|
||||
|
||||
context.DbSetCompanies.AddOrUpdate(
|
||||
p => p.CompanyId,
|
||||
new DatabaseModels.CompanyModel { CompanyId = 0, CodCompany = "", Descript = "--- Tutti ---" }
|
||||
new DatabaseModels.CompanyModel { CompanyId = 1, CodCompany = "", Descript = "--- Tutti ---" }
|
||||
, new DatabaseModels.CompanyModel { CompanyId = 2, CodCompany = "EGW", Descript = "EgalWare" }
|
||||
, new DatabaseModels.CompanyModel { CompanyId = 3, CodCompany = "EGT", Descript = "EgalTech" }
|
||||
, new DatabaseModels.CompanyModel { CompanyId = 4, CodCompany = "STW", Descript = "SteamWare" }
|
||||
);
|
||||
|
||||
context.DbSetCustomers.AddOrUpdate(
|
||||
|
||||
@@ -94,7 +94,6 @@
|
||||
<Compile Include="DatabaseModels\ResurcesModel.cs" />
|
||||
<Compile Include="DatabaseModels\DocsModel.cs" />
|
||||
<Compile Include="DatabaseModels\NegotiationsModel.cs" />
|
||||
<Compile Include="MainDbContext.Views.cs" />
|
||||
<Compile Include="Migrations\202105111732450_InitDb.cs" />
|
||||
<Compile Include="Migrations\202105111732450_InitDb.designer.cs">
|
||||
<DependentUpon>202105111732450_InitDb.cs</DependentUpon>
|
||||
@@ -123,6 +122,14 @@
|
||||
<Compile Include="Migrations\202106171128514_AddCompany.designer.cs">
|
||||
<DependentUpon>202106171128514_AddCompany.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Migrations\202106171238132_UpdNegotiations01.cs" />
|
||||
<Compile Include="Migrations\202106171238132_UpdNegotiations01.designer.cs">
|
||||
<DependentUpon>202106171238132_UpdNegotiations01.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Migrations\202106171241509_UpdNegotiations02.cs" />
|
||||
<Compile Include="Migrations\202106171241509_UpdNegotiations02.designer.cs">
|
||||
<DependentUpon>202106171241509_UpdNegotiations02.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Precision.cs" />
|
||||
<Compile Include="Enums.cs" />
|
||||
<Compile Include="Migrations\Configuration.cs" />
|
||||
@@ -154,6 +161,12 @@
|
||||
<EmbeddedResource Include="Migrations\202106171128514_AddCompany.resx">
|
||||
<DependentUpon>202106171128514_AddCompany.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Migrations\202106171238132_UpdNegotiations01.resx">
|
||||
<DependentUpon>202106171238132_UpdNegotiations01.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Migrations\202106171241509_UpdNegotiations02.resx">
|
||||
<DependentUpon>202106171241509_UpdNegotiations02.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
|
||||
Reference in New Issue
Block a user