Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No coercion operator is defined between types 'System.String' and 'System.Nullable`1[System.Int32]' #2746

Closed
fedrok777 opened this issue Dec 30, 2020 · 4 comments · Fixed by #2750

Comments

@fedrok777
Copy link

fedrok777 commented Dec 30, 2020

Hi,
I found the error in object.
I'm using linq2access rel. 3.2.2.

Exception message: System.InvalidOperationException: 'No coercion operator is defined between types 'System.String' and 'System.Nullable`1[System.Int32].'

Stack trace:
This exception was originally thrown at this call stack:
    [External Code]
    area_iso_it.scadenzeCorsi.popolaDDLLavoratore() in scadenzeCorsi.aspx.vb
    area_iso_it.scadenzeCorsi.gdv_RowCommand(Object, System.Web.UI.WebControls.GridViewCommandEventArgs) in scadenzeCorsi.aspx.vb
    [External Code]

Steps to reproduce

Dim q = DC.AnWorkers.Where(Function(w) w.FkIDCompany.HasValue AndAlso w.FkIDCompany.Value = CType(ddlCliente.SelectedValue, Integer) AndAlso w.IsActive).OrderBy(Function(w) w.Description)  

ddlLavoratore.DataSource = q.ToList()`  '<-- Error here!

The error arised when I upgraded to rel. 3.2.2.
So I made a downgrade to 3.1.6 and all works correctly.
I found other coercion operator error in other points of my software...
I think is a problem of rel. 3.2.0 and successive...

Environment details

linq2db version: 3.2.2.
Database Server: MS Access
Database Provider: ?
Operating system: Windows 10 Pro (ITA)
.NET Framework: ? 4.5

@sdanyliv
Copy link
Member

Can you post your model?

@fedrok777
Copy link
Author

fedrok777 commented Dec 31, 2020

Hi @sdanyliv ,
here is the auto generated model.
Thank you for your help.

//---------------------------------------------------------------------------------------------------
// <auto-generated>
//    This code was generated by T4Model template for T4 (https://github.com/linq2db/linq2db).
//    Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
// </auto-generated>
//---------------------------------------------------------------------------------------------------

#pragma warning disable 1591

using System;
using System.Collections.Generic;
using System.Linq;

using LinqToDB;
using LinqToDB.Mapping;

namespace DM
{
	/// <summary>
	/// Database       : areaiso
	/// Data Source    : C:\Drive\myShare\myDocs\Progetti\net_prj\Vs2019\area-iso-it\area-iso-it\App_Data\areaiso.mdb
	/// Server Version : 04.00.0000
	/// </summary>
	public partial class AreaisoDB : LinqToDB.Data.DataConnection
	{
		public ITable<AnAteco>                     AnAtecoes                    { get { return this.GetTable<AnAteco>(); } }
		public ITable<AnCompany>                   AnCompanies                  { get { return this.GetTable<AnCompany>(); } }
		public ITable<AnMmAteco>                   AnMmAtecoes                  { get { return this.GetTable<AnMmAteco>(); } }
		public ITable<AnSector>                    AnSectors                    { get { return this.GetTable<AnSector>(); } }
		public ITable<AnSite>                      AnSites                      { get { return this.GetTable<AnSite>(); } }
		public ITable<AnWorker>                    AnWorkers                    { get { return this.GetTable<AnWorker>(); } }
		public ITable<CourseRegistration>          CourseRegistrations          { get { return this.GetTable<CourseRegistration>(); } }
		public ITable<CourseType>                  CourseTypes                  { get { return this.GetTable<CourseType>(); } }
		public ITable<CourseWarning>               CourseWarnings               { get { return this.GetTable<CourseWarning>(); } }
		public ITable<EeEventRegistration>         EeEventRegistrations         { get { return this.GetTable<EeEventRegistration>(); } }
		public ITable<EeEventType>                 EeEventTypes                 { get { return this.GetTable<EeEventType>(); } }
		public ITable<EeEventWarning>              EeEventWarnings              { get { return this.GetTable<EeEventWarning>(); } }
		public ITable<FuFund>                      FuFunds                      { get { return this.GetTable<FuFund>(); } }
		public ITable<FuPlan>                      FuPlans                      { get { return this.GetTable<FuPlan>(); } }
		public ITable<FuPlanCompany>               FuPlanCompanies              { get { return this.GetTable<FuPlanCompany>(); } }
		public ITable<FuRegistration>              FuRegistrations              { get { return this.GetTable<FuRegistration>(); } }
		public ITable<Group>                       Groups                       { get { return this.GetTable<Group>(); } }
		public ITable<IsoAudit>                    IsoAudits                    { get { return this.GetTable<IsoAudit>(); } }
		public ITable<IsoAuditor>                  IsoAuditors                  { get { return this.GetTable<IsoAuditor>(); } }
		public ITable<IsoAuditType>                IsoAuditTypes                { get { return this.GetTable<IsoAuditType>(); } }
		public ITable<IsoCertificationBody>        IsoCertificationBodies       { get { return this.GetTable<IsoCertificationBody>(); } }
		public ITable<IsoCertificationType>        IsoCertificationTypes        { get { return this.GetTable<IsoCertificationType>(); } }
		public ITable<IsoChat>                     IsoChats                     { get { return this.GetTable<IsoChat>(); } }
		public ITable<IsoIAFSector>                IsoIAFSectors                { get { return this.GetTable<IsoIAFSector>(); } }
		public ITable<IsoMeeting>                  IsoMeetings                  { get { return this.GetTable<IsoMeeting>(); } }
		public ITable<IsoMmAuditCertificationType> IsoMmAuditCertificationTypes { get { return this.GetTable<IsoMmAuditCertificationType>(); } }
		public ITable<IsoMmAuditIAFSector>         IsoMmAuditIAFSectors         { get { return this.GetTable<IsoMmAuditIAFSector>(); } }
		public ITable<MenuVoice>                   MenuVoices                   { get { return this.GetTable<MenuVoice>(); } }
		public ITable<MenuVoiceFather>             MenuVoiceFathers             { get { return this.GetTable<MenuVoiceFather>(); } }
		public ITable<MmGroupMenuVoice>            MmGroupMenuVoices            { get { return this.GetTable<MmGroupMenuVoice>(); } }
		public ITable<MmUserGroup>                 MmUserGroups                 { get { return this.GetTable<MmUserGroup>(); } }
		public ITable<SftChat>                     SftChats                     { get { return this.GetTable<SftChat>(); } }
		public ITable<SftContract>                 SftContracts                 { get { return this.GetTable<SftContract>(); } }
		public ITable<SftMeeting>                  SftMeetings                  { get { return this.GetTable<SftMeeting>(); } }
		public ITable<SftToDo>                     SftToDoes                    { get { return this.GetTable<SftToDo>(); } }
		public ITable<SftYearContract>             SftYearContracts             { get { return this.GetTable<SftYearContract>(); } }
		public ITable<User>                        Users                        { get { return this.GetTable<User>(); } }
		public ITable<ZzAccessLog>                 ZzAccessLogs                 { get { return this.GetTable<ZzAccessLog>(); } }
		public ITable<ZzRelease>                   ZzReleases                   { get { return this.GetTable<ZzRelease>(); } }

		public AreaisoDB()
		{
			InitDataContext();
			InitMappingSchema();
		}

		public AreaisoDB(string configuration)
			: base(configuration)
		{
			InitDataContext();
			InitMappingSchema();
		}

		partial void InitDataContext  ();
		partial void InitMappingSchema();
	}

	[Table("AN-Ateco")]
	public partial class AnAteco
	{
		[Column("code"),        PrimaryKey,  NotNull] public string Code        { get; set; } // VarChar(8)
		[Column("description"),    Nullable         ] public string Description { get; set; } // VarChar(255)

		#region Associations

		/// <summary>
		/// AN-AtecoAN-MM-Ateco_BackReference
		/// </summary>
		[Association(ThisKey="Code", OtherKey="FkCodeAteco2007", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<AnMmAteco> ANAtecoANMMAtecoes { get; set; }

		#endregion
	}

	[Table("AN-Company")]
	public partial class AnCompany
	{
		[Column(),                        PrimaryKey,  Identity] public int       ID                   { get; set; } // Long
		[Column("companyName"),              Nullable          ] public string    CompanyName          { get; set; } // VarChar(255)
		[Column("fundContact"),              Nullable          ] public string    FundContact          { get; set; } // VarChar(255)
		[Column("mailFundContact"),          Nullable          ] public string    MailFundContact      { get; set; } // VarChar(255)
		[Column("isActive"),              NotNull              ] public bool      IsActive             { get; set; } // Bit
		[Column("isFunds"),               NotNull              ] public bool      IsFunds              { get; set; } // Bit
		/// <summary>
		/// 255
		/// </summary>
		[Column("mailEventContact"),         Nullable          ] public string    MailEventContact     { get; set; } // VarChar(255)
		/// <summary>
		/// 255
		/// </summary>
		[Column("mailLearningContact"),      Nullable          ] public string    MailLearningContact  { get; set; } // VarChar(255)
		/// <summary>
		/// 255
		/// </summary>
		[Column("phoneLearningContact"),     Nullable          ] public string    PhoneLearningContact { get; set; } // VarChar(255)
		/// <summary>
		/// 50
		/// </summary>
		[Column("FK_UserNameCreator"),       Nullable          ] public string    FkUserNameCreator    { get; set; } // VarChar(50)
		/// <summary>
		/// 50
		/// </summary>
		[Column("FK_UserNameUpdater"),       Nullable          ] public string    FkUserNameUpdater    { get; set; } // VarChar(50)
		[Column("creationDate"),             Nullable          ] public DateTime? CreationDate         { get; set; } // DateTime
		[Column("updatingDate"),             Nullable          ] public DateTime? UpdatingDate         { get; set; } // DateTime
		/// <summary>
		/// 50
		/// </summary>
		[Column("FK_UserNameSafetyTech"),    Nullable          ] public string    FkUserNameSafetyTech { get; set; } // VarChar(50)
		[Column("isFlatContractISO"),     NotNull              ] public bool      IsFlatContractISO    { get; set; } // Bit
		[Column("isFlatContractSafety"),  NotNull              ] public bool      IsFlatContractSafety { get; set; } // Bit
		/// <summary>
		/// Settore operativo: usato per i modelli Covid del 2019-2020
		/// </summary>
		[Column("FK_IDSector"),              Nullable          ] public int?      FkIDSector           { get; set; } // Long

		#region Associations

		/// <summary>
		/// AN-CompanyAN-MM-Ateco_BackReference
		/// </summary>
		[Association(ThisKey="ID", OtherKey="FkIDCompany", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<AnMmAteco> ANCompanyANMMAtecoes { get; set; }

		/// <summary>
		/// AN-CompanyAN-Site_BackReference
		/// </summary>
		[Association(ThisKey="ID", OtherKey="FkIDCompany", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<AnSite> ANCompanyANSites { get; set; }

		/// <summary>
		/// AN-CompanyISO-Audit_BackReference
		/// </summary>
		[Association(ThisKey="ID", OtherKey="FkIDCompany", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<IsoAudit> ANCompanyISOAudits { get; set; }

		/// <summary>
		/// AN-CompanySFT-Contract_BackReference
		/// </summary>
		[Association(ThisKey="ID", OtherKey="FkIDCompany", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToOne, IsBackReference=true)]
		public SftContract ANCompanySFTContract { get; set; }

		/// <summary>
		/// AN-SectorAN-Company
		/// </summary>
		[Association(ThisKey="FkIDSector", OtherKey="ID", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="AN-SectorAN-Company", BackReferenceName="ANSectorANCompanies")]
		public AnSector ANSectorANCompany { get; set; }

		/// <summary>
		/// companyEE-EventRegistration_BackReference
		/// </summary>
		[Association(ThisKey="ID", OtherKey="FkIDCompany", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<EeEventRegistration> CompanyEEEventRegistrations { get; set; }

		/// <summary>
		/// companyplanCompany_BackReference
		/// </summary>
		[Association(ThisKey="ID", OtherKey="FkIDCompany", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<FuPlanCompany> CompanyplanCompanies { get; set; }

		/// <summary>
		/// companyworker_BackReference
		/// </summary>
		[Association(ThisKey="ID", OtherKey="FkIDCompany", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<AnWorker> Companyworkers { get; set; }

		/// <summary>
		/// usercompany
		/// </summary>
		[Association(ThisKey="FkUserNameCreator", OtherKey="UserName", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="usercompany", BackReferenceName="Usercompanies")]
		public User Usercompany { get; set; }

		/// <summary>
		/// usercompany1
		/// </summary>
		[Association(ThisKey="FkUserNameSafetyTech", OtherKey="UserName", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="usercompany1", BackReferenceName="Usercompany1BackReferences")]
		public User Usercompany1 { get; set; }

		/// <summary>
		/// usercompany2
		/// </summary>
		[Association(ThisKey="FkUserNameUpdater", OtherKey="UserName", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="usercompany2", BackReferenceName="Usercompany2BackReferences")]
		public User Usercompany2 { get; set; }

		#endregion
	}

	[Table("AN-MM-Ateco")]
	public partial class AnMmAteco
	{
		[Column("FK_IDCompany"),     PrimaryKey(1), Identity] public int    FkIDCompany     { get; set; } // Long
		/// <summary>
		/// Ch10
		/// </summary>
		[Column("FK_CodeAteco2007"), PrimaryKey(2), NotNull ] public string FkCodeAteco2007 { get; set; } // VarChar(10)
		[Column("isMainCode"),                      NotNull ] public bool   IsMainCode      { get; set; } // Bit

		#region Associations

		/// <summary>
		/// AN-AtecoAN-MM-Ateco
		/// </summary>
		[Association(ThisKey="FkCodeAteco2007", OtherKey="Code", CanBeNull=false, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="AN-AtecoAN-MM-Ateco", BackReferenceName="ANAtecoANMMAtecoes")]
		public AnAteco ANAtecoANMMAteco { get; set; }

		/// <summary>
		/// AN-CompanyAN-MM-Ateco
		/// </summary>
		[Association(ThisKey="FkIDCompany", OtherKey="ID", CanBeNull=false, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="AN-CompanyAN-MM-Ateco", BackReferenceName="ANCompanyANMMAtecoes")]
		public AnCompany ANCompanyANMMAteco { get; set; }

		#endregion
	}

	[Table("AN-Sector")]
	public partial class AnSector
	{
		[Column(),              PrimaryKey,  Identity] public int    ID          { get; set; } // Long
		/// <summary>
		/// 50 Ch.
		/// </summary>
		[Column("description"),    Nullable          ] public string Description { get; set; } // VarChar(50)
		[Column("isActive"),    NotNull              ] public bool   IsActive    { get; set; } // Bit

		#region Associations

		/// <summary>
		/// AN-SectorAN-Company_BackReference
		/// </summary>
		[Association(ThisKey="ID", OtherKey="FkIDSector", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<AnCompany> ANSectorANCompanies { get; set; }

		#endregion
	}

	[Table("AN-Site")]
	public partial class AnSite
	{
		[Column(),               PrimaryKey,  Identity] public int    ID           { get; set; } // Long
		/// <summary>
		/// ch 50
		/// </summary>
		[Column("description"),     Nullable          ] public string Description  { get; set; } // VarChar(50)
		/// <summary>
		/// ch 255
		/// </summary>
		[Column("address"),         Nullable          ] public string Address      { get; set; } // VarChar(255)
		/// <summary>
		/// ch 5
		/// </summary>
		[Column("cap"),             Nullable          ] public string Cap          { get; set; } // VarChar(5)
		/// <summary>
		/// ch 255
		/// </summary>
		[Column("commune"),         Nullable          ] public string Commune      { get; set; } // VarChar(255)
		/// <summary>
		/// ch 4
		/// </summary>
		[Column("province"),        Nullable          ] public string Province     { get; set; } // VarChar(4)
		[Column("FK_IDCompany"),    Nullable          ] public int?   FkIDCompany  { get; set; } // Long
		/// <summary>
		/// ch 255
		/// </summary>
		[Column("referent"),        Nullable          ] public string Referent     { get; set; } // VarChar(255)
		/// <summary>
		/// ch 255
		/// </summary>
		[Column("mailReferent"),    Nullable          ] public string MailReferent { get; set; } // VarChar(255)
		/// <summary>
		/// ch 255
		/// </summary>
		[Column("telReferent"),     Nullable          ] public string TelReferent  { get; set; } // VarChar(255)
		[Column("isMainSite"),   NotNull              ] public bool   IsMainSite   { get; set; } // Bit

		#region Associations

		/// <summary>
		/// AN-CompanyAN-Site
		/// </summary>
		[Association(ThisKey="FkIDCompany", OtherKey="ID", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="AN-CompanyAN-Site", BackReferenceName="ANCompanyANSites")]
		public AnCompany ANCompanyANSite { get; set; }

		/// <summary>
		/// AN-SiteSFT-Meeting_BackReference
		/// </summary>
		[Association(ThisKey="ID", OtherKey="FkIDSite", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<SftMeeting> ANSiteSFTMeetings { get; set; }

		#endregion
	}

	[Table("AN-Worker")]
	public partial class AnWorker
	{
		[Column(),               PrimaryKey,  Identity] public int    ID          { get; set; } // Long
		/// <summary>
		/// Nome + cognome (255)
		/// </summary>
		[Column("description"),     Nullable          ] public string Description { get; set; } // VarChar(255)
		[Column("isActive"),     NotNull              ] public bool   IsActive    { get; set; } // Bit
		[Column("fk_IDCompany"),    Nullable          ] public int?   FkIDCompany { get; set; } // Long

		#region Associations

		/// <summary>
		/// companyworker
		/// </summary>
		[Association(ThisKey="FkIDCompany", OtherKey="ID", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="companyworker", BackReferenceName="Companyworkers")]
		public AnCompany Companyworker { get; set; }

		/// <summary>
		/// workercourseRegistration_BackReference
		/// </summary>
		[Association(ThisKey="ID", OtherKey="FkIDWorker", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<CourseRegistration> WorkercourseRegistrations { get; set; }

		#endregion
	}

	[Table("CourseRegistration")]
	public partial class CourseRegistration
	{
		[Column(),                       PrimaryKey,  Identity] public int       ID                   { get; set; } // Long
		[Column("FK_IDWorker"),             Nullable          ] public int?      FkIDWorker           { get; set; } // Long
		[Column("FK_IDCourseType"),         Nullable          ] public int?      FkIDCourseType       { get; set; } // Long
		[Column("annotation"),              Nullable          ] public string    Annotation           { get; set; } // VarChar(255)
		[Column("expireDate"),              Nullable          ] public DateTime? ExpireDate           { get; set; } // DateTime
		[Column("isActive"),             NotNull              ] public bool      IsActive             { get; set; } // Bit
		/// <summary>
		/// 50 caratteri
		/// </summary>
		[Column("FK_UserName"),             Nullable          ] public string    FkUserName           { get; set; } // VarChar(50)
		[Column("isMigrated"),           NotNull              ] public bool      IsMigrated           { get; set; } // Bit
		/// <summary>
		/// 255
		/// </summary>
		[Column("mailLearningContact"),     Nullable          ] public string    MailLearningContact  { get; set; } // VarChar(255)
		/// <summary>
		/// 255
		/// </summary>
		[Column("phoneLearningContact"),    Nullable          ] public string    PhoneLearningContact { get; set; } // VarChar(255)

		#region Associations

		/// <summary>
		/// courseRegistrationcourseWarning_BackReference
		/// </summary>
		[Association(ThisKey="ID", OtherKey="FkIDCourseRegistration", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<CourseWarning> CourseRegistrationcourseWarnings { get; set; }

		/// <summary>
		/// courseTypecourseRegistration
		/// </summary>
		[Association(ThisKey="FkIDCourseType", OtherKey="ID", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="courseTypecourseRegistration", BackReferenceName="CourseTypecourseRegistrations")]
		public CourseType CourseTypecourseRegistration { get; set; }

		/// <summary>
		/// usercourseRegistration
		/// </summary>
		[Association(ThisKey="FkUserName", OtherKey="UserName", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="usercourseRegistration", BackReferenceName="UsercourseRegistrations")]
		public User UsercourseRegistration { get; set; }

		/// <summary>
		/// workercourseRegistration
		/// </summary>
		[Association(ThisKey="FkIDWorker", OtherKey="ID", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="workercourseRegistration", BackReferenceName="WorkercourseRegistrations")]
		public AnWorker WorkercourseRegistration { get; set; }

		#endregion
	}

	[Table("CourseType")]
	public partial class CourseType
	{
		[Column(),                     PrimaryKey,  Identity] public int    ID                 { get; set; } // Long
		/// <summary>
		/// 255 chars
		/// </summary>
		[Column("description"),           Nullable          ] public string Description        { get; set; } // VarChar(255)
		/// <summary>
		/// Frequenza di ripetizione in anni
		/// </summary>
		[Column("frequencyYY"),           Nullable          ] public int?   FrequencyYY        { get; set; } // Long
		/// <summary>
		/// Durata in ore del corso
		/// </summary>
		[Column("durationHH"),            Nullable          ] public string DurationHH         { get; set; } // VarChar(255)
		/// <summary>
		/// 255
		/// </summary>
		[Column("transCodeMigration"),    Nullable          ] public string TransCodeMigration { get; set; } // VarChar(255)
		[Column(),                     NotNull              ] public bool   IsSpecificTraining { get; set; } // Bit

		#region Associations

		/// <summary>
		/// courseTypecourseRegistration_BackReference
		/// </summary>
		[Association(ThisKey="ID", OtherKey="FkIDCourseType", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<CourseRegistration> CourseTypecourseRegistrations { get; set; }

		#endregion
	}

	[Table("CourseWarning")]
	public partial class CourseWarning
	{
		[Column(),                          PrimaryKey, Identity] public int       ID                     { get; set; } // Long
		[Column("dateWarning"),             Nullable            ] public DateTime? DateWarning            { get; set; } // DateTime
		/// <summary>
		/// 255 carattteri
		/// </summary>
		[Column("description"),             Nullable            ] public string    Description            { get; set; } // VarChar(255)
		/// <summary>
		/// 50 caratteri
		/// </summary>
		[Column("FK_UserName"),             Nullable            ] public string    FkUserName             { get; set; } // VarChar(50)
		[Column("FK_IDCourseRegistration"), Nullable            ] public int?      FkIDCourseRegistration { get; set; } // Long

		#region Associations

		/// <summary>
		/// courseRegistrationcourseWarning
		/// </summary>
		[Association(ThisKey="FkIDCourseRegistration", OtherKey="ID", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="courseRegistrationcourseWarning", BackReferenceName="CourseRegistrationcourseWarnings")]
		public CourseRegistration CourseRegistrationcourseWarning { get; set; }

		/// <summary>
		/// usercourseWarning
		/// </summary>
		[Association(ThisKey="FkUserName", OtherKey="UserName", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="usercourseWarning", BackReferenceName="UsercourseWarnings")]
		public User UsercourseWarning { get; set; }

		#endregion
	}

	[Table("EE-EventRegistration")]
	public partial class EeEventRegistration
	{
		[Column(),                 PrimaryKey,  Identity] public int      ID            { get; set; } // Long
		/// <summary>
		/// 255
		/// </summary>
		[Column("annotation"),        Nullable          ] public string   Annotation    { get; set; } // VarChar(255)
		/// <summary>
		/// è la data di in cui scade il tempo utile per avvisare il cliente
		/// </summary>
		[Column("warningDate"),    NotNull              ] public DateTime WarningDate   { get; set; } // DateTime
		/// <summary>
		/// è la data di scadenza reale dell&apos;evento
		/// </summary>
		[Column("expireDate"),     NotNull              ] public DateTime ExpireDate    { get; set; } // DateTime
		[Column("isActive"),       NotNull              ] public bool     IsActive      { get; set; } // Bit
		[Column("isMigrated"),     NotNull              ] public bool     IsMigrated    { get; set; } // Bit
		/// <summary>
		/// 255
		/// </summary>
		[Column("mailContact"),       Nullable          ] public string   MailContact   { get; set; } // VarChar(255)
		/// <summary>
		/// 255
		/// </summary>
		[Column("subject"),           Nullable          ] public string   Subject       { get; set; } // VarChar(255)
		[Column("FK_IDEventType"),    Nullable          ] public int?     FkIDEventType { get; set; } // Long
		/// <summary>
		/// 50 caratteri
		/// </summary>
		[Column("FK_UserName"),       Nullable          ] public string   FkUserName    { get; set; } // VarChar(50)
		[Column("FK_IDCompany"),      Nullable          ] public int?     FkIDCompany   { get; set; } // Long
		[Column("isForFree"),      NotNull              ] public bool     IsForFree     { get; set; } // Bit

		#region Associations

		/// <summary>
		/// companyEE-EventRegistration
		/// </summary>
		[Association(ThisKey="FkIDCompany", OtherKey="ID", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="companyEE-EventRegistration", BackReferenceName="CompanyEEEventRegistrations")]
		public AnCompany CompanyEEEventRegistration { get; set; }

		/// <summary>
		/// EE-EventRegistrationEE-EventWarning_BackReference
		/// </summary>
		[Association(ThisKey="ID", OtherKey="FkIDEventRegistration", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<EeEventWarning> EEEventRegistrationEEEventWarnings { get; set; }

		/// <summary>
		/// EE-EventTypeEE-EventRegistration
		/// </summary>
		[Association(ThisKey="FkIDEventType", OtherKey="ID", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="EE-EventTypeEE-EventRegistration", BackReferenceName="EEEventTypeEEEventRegistrations")]
		public EeEventType EEEventTypeEEEventRegistration { get; set; }

		/// <summary>
		/// userEE-EventRegistration
		/// </summary>
		[Association(ThisKey="FkUserName", OtherKey="UserName", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="userEE-EventRegistration", BackReferenceName="UserEEEventRegistrations")]
		public User UserEEEventRegistration { get; set; }

		#endregion
	}

	[Table("EE-EventType")]
	public partial class EeEventType
	{
		[Column(),                     PrimaryKey, Identity] public int    ID                 { get; set; } // Long
		/// <summary>
		/// 255 chars
		/// </summary>
		[Column("description"),        Nullable            ] public string Description        { get; set; } // VarChar(255)
		/// <summary>
		/// Frequenza di ripetizione in anni: singola precisione per gestire anche le frazioni di anno
		/// </summary>
		[Column("frequencyYY"),        Nullable            ] public float? FrequencyYY        { get; set; } // Single
		/// <summary>
		/// Quanti mesi prima deve venire segnalato l&apos;evento
		/// </summary>
		[Column("memoAnticipationMM"), Nullable            ] public int?   MemoAnticipationMM { get; set; } // Long

		#region Associations

		/// <summary>
		/// EE-EventTypeEE-EventRegistration_BackReference
		/// </summary>
		[Association(ThisKey="ID", OtherKey="FkIDEventType", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<EeEventRegistration> EEEventTypeEEEventRegistrations { get; set; }

		#endregion
	}

	[Table("EE-EventWarning")]
	public partial class EeEventWarning
	{
		[Column(),                         PrimaryKey, Identity] public int       ID                    { get; set; } // Long
		[Column("dateWarning"),            Nullable            ] public DateTime? DateWarning           { get; set; } // DateTime
		/// <summary>
		/// 255 carattteri
		/// </summary>
		[Column("description"),            Nullable            ] public string    Description           { get; set; } // VarChar(255)
		/// <summary>
		/// 50 caratteri
		/// </summary>
		[Column("FK_UserName"),            Nullable            ] public string    FkUserName            { get; set; } // VarChar(50)
		[Column("FK_IDEventRegistration"), Nullable            ] public int?      FkIDEventRegistration { get; set; } // Long

		#region Associations

		/// <summary>
		/// EE-EventRegistrationEE-EventWarning
		/// </summary>
		[Association(ThisKey="FkIDEventRegistration", OtherKey="ID", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="EE-EventRegistrationEE-EventWarning", BackReferenceName="EEEventRegistrationEEEventWarnings")]
		public EeEventRegistration EEEventRegistrationEEEventWarning { get; set; }

		/// <summary>
		/// userEE-EventWarning
		/// </summary>
		[Association(ThisKey="FkUserName", OtherKey="UserName", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="userEE-EventWarning", BackReferenceName="UserEEEventWarnings")]
		public User UserEEEventWarning { get; set; }

		#endregion
	}

	[Table("FU-fund")]
	public partial class FuFund
	{
		/// <summary>
		/// max 50 caratteri
		/// </summary>
		[Column("fundName"), PrimaryKey, NotNull] public string FundName { get; set; } // VarChar(50)
		[Column("isActive"),             NotNull] public bool   IsActive { get; set; } // Bit

		#region Associations

		/// <summary>
		/// fundplan_BackReference
		/// </summary>
		[Association(ThisKey="FundName", OtherKey="FkFundName", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<FuPlan> Fundplans { get; set; }

		#endregion
	}

	[Table("FU-plan")]
	public partial class FuPlan
	{
		/// <summary>
		/// max 50 caratteri
		/// </summary>
		[Column("planName"),       PrimaryKey,  NotNull] public string    PlanName       { get; set; } // VarChar(50)
		[Column("dateApproval"),      Nullable         ] public DateTime? DateApproval   { get; set; } // DateTime
		[Column("dateUpload"),        Nullable         ] public DateTime? DateUpload     { get; set; } // DateTime
		[Column("isApproved"),                  NotNull] public bool      IsApproved     { get; set; } // Bit
		[Column("officialAmount"),    Nullable         ] public decimal?  OfficialAmount { get; set; } // Currency
		[Column("isActive"),                    NotNull] public bool      IsActive       { get; set; } // Bit
		/// <summary>
		/// max 50 caratteri
		/// </summary>
		[Column("fk_fundName"),       Nullable         ] public string    FkFundName     { get; set; } // VarChar(50)

		#region Associations

		/// <summary>
		/// fundplan
		/// </summary>
		[Association(ThisKey="FkFundName", OtherKey="FundName", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="fundplan", BackReferenceName="Fundplans")]
		public FuFund Fundplan { get; set; }

		/// <summary>
		/// planplanCompany_BackReference
		/// </summary>
		[Association(ThisKey="PlanName", OtherKey="FkPlanName", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<FuPlanCompany> PlanplanCompanies { get; set; }

		#endregion
	}

	[Table("FU-planCompany")]
	public partial class FuPlanCompany
	{
		/// <summary>
		/// max 50 caratteri
		/// </summary>
		[Column("fk_planName"),    PrimaryKey(2), NotNull ] public string   FkPlanName     { get; set; } // VarChar(50)
		[Column("fk_IDCompany"),   PrimaryKey(1), Identity] public int      FkIDCompany    { get; set; } // Long
		[Column("declaredAmount"),    Nullable            ] public decimal? DeclaredAmount { get; set; } // Currency
		[Column("isBilled"),                      NotNull ] public bool     IsBilled       { get; set; } // Bit
		[Column("isActive"),                      NotNull ] public bool     IsActive       { get; set; } // Bit
		[Column("isClosed"),                      NotNull ] public bool     IsClosed       { get; set; } // Bit

		#region Associations

		/// <summary>
		/// companyplanCompany
		/// </summary>
		[Association(ThisKey="FkIDCompany", OtherKey="ID", CanBeNull=false, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="companyplanCompany", BackReferenceName="CompanyplanCompanies")]
		public AnCompany CompanyplanCompany { get; set; }

		/// <summary>
		/// planCompanyregistration_BackReference
		/// </summary>
		[Association(ThisKey="FkIDCompany, FkPlanName", OtherKey="FkIDCompany, FkPlanName", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<FuRegistration> PlanCompanyregistrations { get; set; }

		/// <summary>
		/// planplanCompany
		/// </summary>
		[Association(ThisKey="FkPlanName", OtherKey="PlanName", CanBeNull=false, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="planplanCompany", BackReferenceName="PlanplanCompanies")]
		public FuPlan PlanplanCompany { get; set; }

		#endregion
	}

	[Table("FU-registration")]
	public partial class FuRegistration
	{
		[Column(),                   PrimaryKey,  Identity] public int       ID               { get; set; } // Long
		[Column("amount"),              Nullable          ] public decimal?  Amount           { get; set; } // Currency
		/// <summary>
		/// 255 ch
		/// </summary>
		[Column("description"),         Nullable          ] public string    Description      { get; set; } // VarChar(255)
		/// <summary>
		/// Data di previsione di chiusura del lavoro
		/// </summary>
		[Column("dateDeadline"),        Nullable          ] public DateTime? DateDeadline     { get; set; } // DateTime
		/// <summary>
		/// Data di esecuzione del lavoro
		/// </summary>
		[Column("dateEffective"),       Nullable          ] public DateTime? DateEffective    { get; set; } // DateTime
		/// <summary>
		/// esecutore max 50 caratteri
		/// </summary>
		[Column("internalContact"),     Nullable          ] public string    InternalContact  { get; set; } // VarChar(50)
		/// <summary>
		/// data ultima modifica
		/// </summary>
		[Column("dateRegistration"),    Nullable          ] public DateTime? DateRegistration { get; set; } // DateTime
		/// <summary>
		/// per lavori che si ripetono negli anni anche su più piani
		/// </summary>
		[Column("isPeriodic"),       NotNull              ] public bool      IsPeriodic       { get; set; } // Bit
		/// <summary>
		/// max 50 caratteri: utente dell&apos;ultima modifica
		/// </summary>
		[Column("fk_userName"),      NotNull              ] public string    FkUserName       { get; set; } // VarChar(50)
		/// <summary>
		/// max 50 caratteri
		/// </summary>
		[Column("fk_planName"),      NotNull              ] public string    FkPlanName       { get; set; } // VarChar(50)
		[Column("fk_IDCompany"),                  Identity] public int       FkIDCompany      { get; set; } // Long
		/// <summary>
		/// Lavoro completato: da valorizzare quando il lavoro è stato fatto
		/// </summary>
		[Column("isClosed"),         NotNull              ] public bool      IsClosed         { get; set; } // Bit

		#region Associations

		/// <summary>
		/// planCompanyregistration
		/// </summary>
		[Association(ThisKey="FkIDCompany, FkPlanName", OtherKey="FkIDCompany, FkPlanName", CanBeNull=false, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="planCompanyregistration", BackReferenceName="PlanCompanyregistrations")]
		public FuPlanCompany PlanCompanyregistration { get; set; }

		/// <summary>
		/// userregistration
		/// </summary>
		[Association(ThisKey="FkUserName", OtherKey="UserName", CanBeNull=false, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="userregistration", BackReferenceName="Userregistrations")]
		public User Userregistration { get; set; }

		#endregion
	}

	[Table("Group")]
	public partial class Group
	{
		/// <summary>
		/// max 30 caratteri
		/// </summary>
		[Column("groupName"),   PrimaryKey,  NotNull] public string GroupName   { get; set; } // VarChar(30)
		[Column("description"),    Nullable         ] public string Description { get; set; } // VarChar(255)
		[Column("isActive"),                 NotNull] public bool   IsActive    { get; set; } // Bit

		#region Associations

		/// <summary>
		/// groupgroupMenuVoice_BackReference
		/// </summary>
		[Association(ThisKey="GroupName", OtherKey="FkGroupName", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<MmGroupMenuVoice> GroupgroupMenuVoices { get; set; }

		/// <summary>
		/// groupuserGroup_BackReference
		/// </summary>
		[Association(ThisKey="GroupName", OtherKey="FkGroupName", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<MmUserGroup> GroupuserGroups { get; set; }

		#endregion
	}

	[Table("ISO-Audit")]
	public partial class IsoAudit
	{
		[Column(),                            PrimaryKey,  Identity] public int       ID                        { get; set; } // Long
		[Column("FK_IDCompany"),                           Identity] public int       FkIDCompany               { get; set; } // Long
		[Column("FK_CodeCertificationBody"),     Nullable          ] public string    FkCodeCertificationBody   { get; set; } // VarChar(255)
		[Column("FK_IDAuditor"),                 Nullable          ] public int?      FkIDAuditor               { get; set; } // Long
		[Column("FK_UserNameConsultant"),        Nullable          ] public string    FkUserNameConsultant      { get; set; } // VarChar(50)
		/// <summary>
		/// è stato dato il consenso al lancio ordine?
		/// </summary>
		[Column("isJobStarted"),              NotNull              ] public bool      IsJobStarted              { get; set; } // Bit
		/// <summary>
		/// In mezze giornate
		/// </summary>
		[Column("nrConsultingMeeting"),          Nullable          ] public int?      NrConsultingMeeting       { get; set; } // Long
		/// <summary>
		/// In mezze giornate
		/// </summary>
		[Column("nrAuditMeeting"),               Nullable          ] public int?      NrAuditMeeting            { get; set; } // Long
		/// <summary>
		/// Data programmata per l&apos;audit
		/// </summary>
		[Column("dateProgrammedAudit"),          Nullable          ] public DateTime? DateProgrammedAudit       { get; set; } // DateTime
		[Column("isDateAuditDefinitive"),     NotNull              ] public bool      IsDateAuditDefinitive     { get; set; } // Bit
		/// <summary>
		/// Data scadenza del certificato
		/// </summary>
		[Column("dateCertificateExpiration"),    Nullable          ] public DateTime? DateCertificateExpiration { get; set; } // DateTime
		[Column("FK_IDAuditType"),               Nullable          ] public int?      FkIDAuditType             { get; set; } // Long
		[Column("comment"),                      Nullable          ] public string    Comment                   { get; set; } // LongText
		[Column("commentHitOrder"),              Nullable          ] public string    CommentHitOrder           { get; set; } // LongText
		[Column("isActive"),                  NotNull              ] public bool      IsActive                  { get; set; } // Bit
		/// <summary>
		/// max 50 ch: utente che ha fatto l&apos;ultimo update
		/// </summary>
		[Column("FK_UserNameLastUpdate"),        Nullable          ] public string    FkUserNameLastUpdate      { get; set; } // VarChar(50)
		/// <summary>
		/// data ultimo update
		/// </summary>
		[Column("dateLastUpdate"),               Nullable          ] public DateTime? DateLastUpdate            { get; set; } // DateTime

		#region Associations

		/// <summary>
		/// AN-CompanyISO-Audit
		/// </summary>
		[Association(ThisKey="FkIDCompany", OtherKey="ID", CanBeNull=false, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="AN-CompanyISO-Audit", BackReferenceName="ANCompanyISOAudits")]
		public AnCompany ANCompanyISOAudit { get; set; }

		/// <summary>
		/// ISO-AuditISO-Chat_BackReference
		/// </summary>
		[Association(ThisKey="ID", OtherKey="FkIDAudit", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<IsoChat> ISOAuditISOChats { get; set; }

		/// <summary>
		/// ISO-AuditISO-Meeting_BackReference
		/// </summary>
		[Association(ThisKey="ID", OtherKey="FkIDAudit", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<IsoMeeting> ISOAuditISOMeetings { get; set; }

		/// <summary>
		/// ISO-AuditISO-MM-AuditCertificationType_BackReference
		/// </summary>
		[Association(ThisKey="ID", OtherKey="FkIDAudit", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<IsoMmAuditCertificationType> ISOAuditISOMMAuditCertificationTypes { get; set; }

		/// <summary>
		/// ISO-AuditISO-MM-AuditIAFSector_BackReference
		/// </summary>
		[Association(ThisKey="ID", OtherKey="FkIDAudit", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<IsoMmAuditIAFSector> ISOAuditISOMMAuditIAFSectors { get; set; }

		/// <summary>
		/// ISO-AuditorISO-Audit
		/// </summary>
		[Association(ThisKey="FkIDAuditor", OtherKey="ID", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="ISO-AuditorISO-Audit", BackReferenceName="ISOAuditorISOAudits")]
		public IsoAuditor ISOAuditorISOAudit { get; set; }

		/// <summary>
		/// ISO-AuditTypeISO-Audit
		/// </summary>
		[Association(ThisKey="FkIDAuditType", OtherKey="ID", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="ISO-AuditTypeISO-Audit", BackReferenceName="ISOAuditTypeISOAudits")]
		public IsoAuditType ISOAuditTypeISOAudit { get; set; }

		/// <summary>
		/// ISO-CertificationBodyISO-Audit
		/// </summary>
		[Association(ThisKey="FkCodeCertificationBody", OtherKey="Code", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="ISO-CertificationBodyISO-Audit", BackReferenceName="ISOCertificationBodyISOAudits")]
		public IsoCertificationBody ISOCertificationBodyISOAudit { get; set; }

		/// <summary>
		/// UserISO-Audit
		/// </summary>
		[Association(ThisKey="FkUserNameConsultant", OtherKey="UserName", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="UserISO-Audit", BackReferenceName="UserISOAudits")]
		public User UserISOAudit { get; set; }

		/// <summary>
		/// UserISO-Audit1
		/// </summary>
		[Association(ThisKey="FkUserNameLastUpdate", OtherKey="UserName", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="UserISO-Audit1", BackReferenceName="UserISOAudit1BackReferences")]
		public User UserISOAudit1 { get; set; }

		#endregion
	}

	[Table("ISO-Auditor")]
	public partial class IsoAuditor
	{
		[Column(),           PrimaryKey,  Identity] public int    ID       { get; set; } // Long
		[Column("name"),        Nullable          ] public string Name     { get; set; } // VarChar(255)
		[Column("surname"),     Nullable          ] public string Surname  { get; set; } // VarChar(255)
		[Column("isActive"), NotNull              ] public bool   IsActive { get; set; } // Bit

		#region Associations

		/// <summary>
		/// ISO-AuditorISO-Audit_BackReference
		/// </summary>
		[Association(ThisKey="ID", OtherKey="FkIDAuditor", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<IsoAudit> ISOAuditorISOAudits { get; set; }

		#endregion
	}

	[Table("ISO-AuditType")]
	public partial class IsoAuditType
	{
		[Column(),              PrimaryKey,  Identity] public int    ID          { get; set; } // Long
		[Column("description"),    Nullable          ] public string Description { get; set; } // VarChar(255)
		[Column("isActive"),    NotNull              ] public bool   IsActive    { get; set; } // Bit

		#region Associations

		/// <summary>
		/// ISO-AuditTypeISO-Audit_BackReference
		/// </summary>
		[Association(ThisKey="ID", OtherKey="FkIDAuditType", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<IsoAudit> ISOAuditTypeISOAudits { get; set; }

		#endregion
	}

	[Table("ISO-CertificationBody")]
	public partial class IsoCertificationBody
	{
		[Column("code"),            PrimaryKey,  NotNull] public string Code            { get; set; } // VarChar(255)
		[Column("description"),        Nullable         ] public string Description     { get; set; } // VarChar(255)
		[Column("descriptionLong"),    Nullable         ] public string DescriptionLong { get; set; } // VarChar(255)
		[Column("isActive"),                     NotNull] public bool   IsActive        { get; set; } // Bit

		#region Associations

		/// <summary>
		/// ISO-CertificationBodyISO-Audit_BackReference
		/// </summary>
		[Association(ThisKey="Code", OtherKey="FkCodeCertificationBody", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<IsoAudit> ISOCertificationBodyISOAudits { get; set; }

		#endregion
	}

	[Table("ISO-CertificationType")]
	public partial class IsoCertificationType
	{
		[Column("code"),        PrimaryKey,  NotNull] public string Code        { get; set; } // VarChar(255)
		[Column("description"),    Nullable         ] public string Description { get; set; } // VarChar(255)
		[Column("isActive"),                 NotNull] public bool   IsActive    { get; set; } // Bit

		#region Associations

		/// <summary>
		/// ISO-CertificationTypeISO-MM-AuditCertificationType_BackReference
		/// </summary>
		[Association(ThisKey="Code", OtherKey="FkCodeCertificationType", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<IsoMmAuditCertificationType> ISOCertificationTypeISOMMAuditCertificationTypes { get; set; }

		#endregion
	}

	[Table("ISO-Chat")]
	public partial class IsoChat
	{
		[Column(),                    PrimaryKey, Identity] public int      ID               { get; set; } // Long
		[Column("dateTimeMsg"),       NotNull             ] public DateTime DateTimeMsg      { get; set; } // DateTime
		[Column("FK_IDAudit"),                    Identity] public int      FkIDAudit        { get; set; } // Long
		/// <summary>
		/// 50 caratteri
		/// </summary>
		[Column("FK_UserNameAuthor"), NotNull             ] public string   FkUserNameAuthor { get; set; } // VarChar(50)
		/// <summary>
		/// max 6000 caratteri
		/// </summary>
		[Column("msg"),               NotNull             ] public string   Msg              { get; set; } // LongText
		/// <summary>
		/// dice se il record ha subito modifiche dopo la sua prima creazione
		/// </summary>
		[Column("isModified"),        NotNull             ] public bool     IsModified       { get; set; } // Bit

		#region Associations

		/// <summary>
		/// ISO-AuditISO-Chat
		/// </summary>
		[Association(ThisKey="FkIDAudit", OtherKey="ID", CanBeNull=false, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="ISO-AuditISO-Chat", BackReferenceName="ISOAuditISOChats")]
		public IsoAudit ISOAuditISOChat { get; set; }

		/// <summary>
		/// UserISO-Chat
		/// </summary>
		[Association(ThisKey="FkUserNameAuthor", OtherKey="UserName", CanBeNull=false, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="UserISO-Chat", BackReferenceName="UserISOChats")]
		public User UserISOChat { get; set; }

		#endregion
	}

	[Table("ISO-IAFSector")]
	public partial class IsoIAFSector
	{
		[Column("code"),        PrimaryKey,  NotNull] public string Code        { get; set; } // VarChar(255)
		[Column("description"),    Nullable         ] public string Description { get; set; } // VarChar(255)

		#region Associations

		/// <summary>
		/// ISO-IAFSectorISO-MM-AuditIAFSector_BackReference
		/// </summary>
		[Association(ThisKey="Code", OtherKey="FkCodeIAFSector", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<IsoMmAuditIAFSector> ISOIAFSectorISOMMAuditIAFSectors { get; set; }

		#endregion
	}

	[Table("ISO-Meeting")]
	public partial class IsoMeeting
	{
		[Column(),               PrimaryKey,  Identity] public int       ID           { get; set; } // Long
		[Column("meetingDate"),     Nullable          ] public DateTime? MeetingDate  { get; set; } // DateTime
		/// <summary>
		/// 50 caratteri
		/// </summary>
		[Column("FK_UserName"),     Nullable          ] public string    FkUserName   { get; set; } // VarChar(50)
		/// <summary>
		/// Se non è consulenza è audit
		/// </summary>
		[Column("isConsulting"), NotNull              ] public bool      IsConsulting { get; set; } // Bit
		[Column("FK_IDAudit"),      Nullable          ] public int?      FkIDAudit    { get; set; } // Long
		/// <summary>
		/// Presenza/remoto
		/// </summary>
		[Column("isOnSite"),     NotNull              ] public bool      IsOnSite     { get; set; } // Bit

		#region Associations

		/// <summary>
		/// ISO-AuditISO-Meeting
		/// </summary>
		[Association(ThisKey="FkIDAudit", OtherKey="ID", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="ISO-AuditISO-Meeting", BackReferenceName="ISOAuditISOMeetings")]
		public IsoAudit ISOAuditISOMeeting { get; set; }

		/// <summary>
		/// UserISO-Meeting
		/// </summary>
		[Association(ThisKey="FkUserName", OtherKey="UserName", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="UserISO-Meeting", BackReferenceName="UserISOMeetings")]
		public User UserISOMeeting { get; set; }

		#endregion
	}

	[Table("ISO-MM-AuditCertificationType")]
	public partial class IsoMmAuditCertificationType
	{
		[Column("FK_IDAudit"),               PrimaryKey(1), Identity] public int    FkIDAudit               { get; set; } // Long
		[Column("FK_CodeCertificationType"), PrimaryKey(2), NotNull ] public string FkCodeCertificationType { get; set; } // VarChar(255)

		#region Associations

		/// <summary>
		/// ISO-AuditISO-MM-AuditCertificationType
		/// </summary>
		[Association(ThisKey="FkIDAudit", OtherKey="ID", CanBeNull=false, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="ISO-AuditISO-MM-AuditCertificationType", BackReferenceName="ISOAuditISOMMAuditCertificationTypes")]
		public IsoAudit ISOAuditISOMMAuditCertificationType { get; set; }

		/// <summary>
		/// ISO-CertificationTypeISO-MM-AuditCertificationType
		/// </summary>
		[Association(ThisKey="FkCodeCertificationType", OtherKey="Code", CanBeNull=false, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="ISO-CertificationTypeISO-MM-AuditCertificationType", BackReferenceName="ISOCertificationTypeISOMMAuditCertificationTypes")]
		public IsoCertificationType ISOCertificationTypeISOMMAuditCertificationType { get; set; }

		#endregion
	}

	[Table("ISO-MM-AuditIAFSector")]
	public partial class IsoMmAuditIAFSector
	{
		[Column("FK_CodeIAFSector"), PrimaryKey(1), NotNull ] public string FkCodeIAFSector { get; set; } // VarChar(255)
		[Column("FK_IDAudit"),       PrimaryKey(2), Identity] public int    FkIDAudit       { get; set; } // Long

		#region Associations

		/// <summary>
		/// ISO-AuditISO-MM-AuditIAFSector
		/// </summary>
		[Association(ThisKey="FkIDAudit", OtherKey="ID", CanBeNull=false, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="ISO-AuditISO-MM-AuditIAFSector", BackReferenceName="ISOAuditISOMMAuditIAFSectors")]
		public IsoAudit ISOAuditISOMMAuditIAFSector { get; set; }

		/// <summary>
		/// ISO-IAFSectorISO-MM-AuditIAFSector
		/// </summary>
		[Association(ThisKey="FkCodeIAFSector", OtherKey="Code", CanBeNull=false, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="ISO-IAFSectorISO-MM-AuditIAFSector", BackReferenceName="ISOIAFSectorISOMMAuditIAFSectors")]
		public IsoIAFSector ISOIAFSectorISOMMAuditIAFSector { get; set; }

		#endregion
	}

	[Table("MenuVoice")]
	public partial class MenuVoice
	{
		/// <summary>
		/// 255
		/// </summary>
		[Column(),                     PrimaryKey,  NotNull] public string ASPXPage          { get; set; } // VarChar(255)
		/// <summary>
		/// 255
		/// </summary>
		[Column("description"),           Nullable         ] public string Description       { get; set; } // VarChar(255)
		[Column("orderAppearance"),       Nullable         ] public int?   OrderAppearance   { get; set; } // Long
		[Column("isActive"),                        NotNull] public bool   IsActive          { get; set; } // Bit
		/// <summary>
		/// 255
		/// </summary>
		[Column("fk_FatherMenuVoice"),    Nullable         ] public string FkFatherMenuVoice { get; set; } // VarChar(255)

		#region Associations

		/// <summary>
		/// menuVoiceFathermenuVoice
		/// </summary>
		[Association(ThisKey="FkFatherMenuVoice", OtherKey="ASPXPage", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="menuVoiceFathermenuVoice", BackReferenceName="MenuVoiceFathermenuVoices")]
		public MenuVoiceFather MenuVoiceFathermenuVoice { get; set; }

		/// <summary>
		/// menuVoicegroupMenuVoice_BackReference
		/// </summary>
		[Association(ThisKey="ASPXPage", OtherKey="FkASPXPage", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<MmGroupMenuVoice> MenuVoicegroupMenuVoices { get; set; }

		#endregion
	}

	[Table("MenuVoiceFather")]
	public partial class MenuVoiceFather
	{
		[Column(),                  PrimaryKey,  NotNull] public string ASPXPage        { get; set; } // VarChar(255)
		[Column("description"),                  NotNull] public string Description     { get; set; } // VarChar(255)
		[Column("orderAppearance"),    Nullable         ] public int?   OrderAppearance { get; set; } // Long

		#region Associations

		/// <summary>
		/// menuVoiceFathermenuVoice_BackReference
		/// </summary>
		[Association(ThisKey="ASPXPage", OtherKey="FkFatherMenuVoice", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<MenuVoice> MenuVoiceFathermenuVoices { get; set; }

		#endregion
	}

	[Table("MM-groupMenuVoice")]
	public partial class MmGroupMenuVoice
	{
		/// <summary>
		/// 255
		/// </summary>
		[Column("FK_ASPXPage"),  PrimaryKey(1), NotNull] public string FkASPXPage  { get; set; } // VarChar(255)
		/// <summary>
		/// 30
		/// </summary>
		[Column("FK_groupName"), PrimaryKey(2), NotNull] public string FkGroupName { get; set; } // VarChar(30)

		#region Associations

		/// <summary>
		/// groupgroupMenuVoice
		/// </summary>
		[Association(ThisKey="FkGroupName", OtherKey="GroupName", CanBeNull=false, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="groupgroupMenuVoice", BackReferenceName="GroupgroupMenuVoices")]
		public Group GroupgroupMenuVoice { get; set; }

		/// <summary>
		/// menuVoicegroupMenuVoice
		/// </summary>
		[Association(ThisKey="FkASPXPage", OtherKey="ASPXPage", CanBeNull=false, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="menuVoicegroupMenuVoice", BackReferenceName="MenuVoicegroupMenuVoices")]
		public MenuVoice MenuVoicegroupMenuVoice { get; set; }

		#endregion
	}

	[Table("MM-userGroup")]
	public partial class MmUserGroup
	{
		/// <summary>
		/// max 30 caratteri
		/// </summary>
		[Column("FK_groupName"), PrimaryKey(1), NotNull] public string FkGroupName { get; set; } // VarChar(30)
		/// <summary>
		/// max 50 caratteri
		/// </summary>
		[Column("fk_userName"),  PrimaryKey(2), NotNull] public string FkUserName  { get; set; } // VarChar(50)

		#region Associations

		/// <summary>
		/// groupuserGroup
		/// </summary>
		[Association(ThisKey="FkGroupName", OtherKey="GroupName", CanBeNull=false, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="groupuserGroup", BackReferenceName="GroupuserGroups")]
		public Group GroupuserGroup { get; set; }

		/// <summary>
		/// useruserGroup
		/// </summary>
		[Association(ThisKey="FkUserName", OtherKey="UserName", CanBeNull=false, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="useruserGroup", BackReferenceName="UseruserGroups")]
		public User UseruserGroup { get; set; }

		#endregion
	}

	[Table("SFT-Chat")]
	public partial class SftChat
	{
		[Column(),                    PrimaryKey, Identity] public int      ID               { get; set; } // Long
		[Column("dateTimeMsg"),       NotNull             ] public DateTime DateTimeMsg      { get; set; } // DateTime
		[Column("FK_IDCompany"),                  Identity] public int      FkIDCompany      { get; set; } // Long
		/// <summary>
		/// 50 caratteri
		/// </summary>
		[Column("FK_UserNameAuthor"), NotNull             ] public string   FkUserNameAuthor { get; set; } // VarChar(50)
		/// <summary>
		/// max 6000 caratteri
		/// </summary>
		[Column("msg"),               NotNull             ] public string   Msg              { get; set; } // LongText
		/// <summary>
		/// dice se il record ha subito modifiche dopo la sua prima creazione
		/// </summary>
		[Column("isModified"),        NotNull             ] public bool     IsModified       { get; set; } // Bit

		#region Associations

		/// <summary>
		/// SFT-ContractSFT-Chat
		/// </summary>
		[Association(ThisKey="FkIDCompany", OtherKey="FkIDCompany", CanBeNull=false, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="SFT-ContractSFT-Chat", BackReferenceName="SFTContractSFTChats")]
		public SftContract SFTContractSFTChat { get; set; }

		/// <summary>
		/// UserSFT-Chat
		/// </summary>
		[Association(ThisKey="FkUserNameAuthor", OtherKey="UserName", CanBeNull=false, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="UserSFT-Chat", BackReferenceName="UserSFTChats")]
		public User UserSFTChat { get; set; }

		#endregion
	}

	[Table("SFT-Contract")]
	public partial class SftContract
	{
		[Column("FK_IDCompany"), PrimaryKey, Identity] public int  FkIDCompany { get; set; } // Long
		[Column("isActive"),     NotNull             ] public bool IsActive    { get; set; } // Bit

		#region Associations

		/// <summary>
		/// AN-CompanySFT-Contract
		/// </summary>
		[Association(ThisKey="FkIDCompany", OtherKey="ID", CanBeNull=false, Relationship=LinqToDB.Mapping.Relationship.OneToOne, KeyName="AN-CompanySFT-Contract", BackReferenceName="ANCompanySFTContract")]
		public AnCompany ANCompanySFTContract { get; set; }

		/// <summary>
		/// SFT-ContractSFT-Chat_BackReference
		/// </summary>
		[Association(ThisKey="FkIDCompany", OtherKey="FkIDCompany", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<SftChat> SFTContractSFTChats { get; set; }

		/// <summary>
		/// SFT-ContractSFT-ToDo_BackReference
		/// </summary>
		[Association(ThisKey="FkIDCompany", OtherKey="FkIDCompany", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<SftToDo> SFTContractSFTToDoes { get; set; }

		/// <summary>
		/// SFT-ContractSFT-YearContract_BackReference
		/// </summary>
		[Association(ThisKey="FkIDCompany", OtherKey="FkIDCompany", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<SftYearContract> SFTContractSFTYearContracts { get; set; }

		#endregion
	}

	[Table("SFT-Meeting")]
	public partial class SftMeeting
	{
		/// <summary>
		/// anno di competenza della consulenza
		/// </summary>
		[Column("perYear"),      PrimaryKey(1), Identity] public int       PerYear     { get; set; } // Long
		[Column("FK_IDCompany"), PrimaryKey(2), Identity] public int       FkIDCompany { get; set; } // Long
		[Column(),               PrimaryKey(3), Identity] public int       ID          { get; set; } // Long
		[Column("FK_IDSite"),       Nullable            ] public int?      FkIDSite    { get; set; } // Long
		[Column("meetingDate"),     Nullable            ] public DateTime? MeetingDate { get; set; } // DateTime
		/// <summary>
		/// 50 caratteri
		/// </summary>
		[Column("FK_UserName"),     Nullable            ] public string    FkUserName  { get; set; } // VarChar(50)
		/// <summary>
		/// Presenza/remoto
		/// </summary>
		[Column("isOnSite"),     NotNull                ] public bool      IsOnSite    { get; set; } // Bit
		/// <summary>
		/// Ch 255
		/// </summary>
		[Column("note"),            Nullable            ] public string    Note        { get; set; } // VarChar(255)

		#region Associations

		/// <summary>
		/// AN-SiteSFT-Meeting
		/// </summary>
		[Association(ThisKey="FkIDSite", OtherKey="ID", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="AN-SiteSFT-Meeting", BackReferenceName="ANSiteSFTMeetings")]
		public AnSite ANSiteSFTMeeting { get; set; }

		/// <summary>
		/// SFT-YearContractSFT-Meeting
		/// </summary>
		[Association(ThisKey="PerYear, FkIDCompany", OtherKey="PerYear, FkIDCompany", CanBeNull=false, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="SFT-YearContractSFT-Meeting", BackReferenceName="SFTYearContractSFTMeetings")]
		public SftYearContract SFTYearContractSFTMeeting { get; set; }

		/// <summary>
		/// UserSFT-Meeting
		/// </summary>
		[Association(ThisKey="FkUserName", OtherKey="UserName", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="UserSFT-Meeting", BackReferenceName="UserSFTMeetings")]
		public User UserSFTMeeting { get; set; }

		#endregion
	}

	[Table("SFT-ToDo")]
	public partial class SftToDo
	{
		[Column(),               PrimaryKey,  Identity] public int       ID          { get; set; } // Long
		[Column("FK_IDCompany"),    Nullable          ] public int?      FkIDCompany { get; set; } // Long
		[Column("priority"),        Nullable          ] public int?      Priority    { get; set; } // Long
		/// <summary>
		/// ch 255
		/// </summary>
		[Column("description"),     Nullable          ] public string    Description { get; set; } // VarChar(255)
		[Column("dateClosed"),      Nullable          ] public DateTime? DateClosed  { get; set; } // DateTime
		[Column("isClosed"),     NotNull              ] public bool      IsClosed    { get; set; } // Bit

		#region Associations

		/// <summary>
		/// SFT-ContractSFT-ToDo
		/// </summary>
		[Association(ThisKey="FkIDCompany", OtherKey="FkIDCompany", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="SFT-ContractSFT-ToDo", BackReferenceName="SFTContractSFTToDoes")]
		public SftContract SFTContractSFTToDo { get; set; }

		#endregion
	}

	[Table("SFT-YearContract")]
	public partial class SftYearContract
	{
		/// <summary>
		/// anno di competenza della consulenza
		/// </summary>
		[Column("perYear"),                 PrimaryKey(1), Identity] public int      PerYear                { get; set; } // Long
		[Column("FK_IDCompany"),            PrimaryKey(2), Identity] public int      FkIDCompany            { get; set; } // Long
		/// <summary>
		/// 0 significa che si va a consuntivo
		/// </summary>
		[Column("numberMeetingPerYear"),       Nullable            ] public int?     NumberMeetingPerYear   { get; set; } // Long
		/// <summary>
		/// 50 ch
		/// </summary>
		[Column("FK_UserNameRSPP"),            Nullable            ] public string   FkUserNameRSPP         { get; set; } // VarChar(50)
		/// <summary>
		/// max 6000
		/// </summary>
		[Column("note"),                       Nullable            ] public string   Note                   { get; set; } // LongText
		[Column("isSuspended"),             NotNull                ] public bool     IsSuspended            { get; set; } // Bit
		/// <summary>
		/// 50 ch
		/// </summary>
		[Column("FK_UserNameTechAssigned"),    Nullable            ] public string   FkUserNameTechAssigned { get; set; } // VarChar(50)
		[Column("amount"),                     Nullable            ] public decimal? Amount                 { get; set; } // Currency

		#region Associations

		/// <summary>
		/// SFT-ContractSFT-YearContract
		/// </summary>
		[Association(ThisKey="FkIDCompany", OtherKey="FkIDCompany", CanBeNull=false, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="SFT-ContractSFT-YearContract", BackReferenceName="SFTContractSFTYearContracts")]
		public SftContract SFTContractSFTYearContract { get; set; }

		/// <summary>
		/// SFT-YearContractSFT-Meeting_BackReference
		/// </summary>
		[Association(ThisKey="PerYear, FkIDCompany", OtherKey="PerYear, FkIDCompany", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<SftMeeting> SFTYearContractSFTMeetings { get; set; }

		/// <summary>
		/// UserSFT-YearContract
		/// </summary>
		[Association(ThisKey="FkUserNameRSPP", OtherKey="UserName", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="UserSFT-YearContract", BackReferenceName="UserSFTYearContracts")]
		public User UserSFTYearContract { get; set; }

		/// <summary>
		/// UserSFT-YearContract1
		/// </summary>
		[Association(ThisKey="FkUserNameTechAssigned", OtherKey="UserName", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="UserSFT-YearContract1", BackReferenceName="UserSFTYearContract1BackReferences")]
		public User UserSFTYearContract1 { get; set; }

		#endregion
	}

	[Table("User")]
	public partial class User
	{
		/// <summary>
		/// è la mail: massimo 50 caratteri
		/// </summary>
		[Column("userName"),  PrimaryKey,  NotNull] public string UserName  { get; set; } // VarChar(50)
		[Column("pwd"),          Nullable         ] public string Pwd       { get; set; } // VarChar(255)
		[Column("isActive"),               NotNull] public bool   IsActive  { get; set; } // Bit
		/// <summary>
		/// nome utente
		/// </summary>
		[Column("firstName"),    Nullable         ] public string FirstName { get; set; } // VarChar(255)
		/// <summary>
		/// cognome utente
		/// </summary>
		[Column("surname"),      Nullable         ] public string Surname   { get; set; } // VarChar(255)

		#region Associations

		/// <summary>
		/// useraccessLog_BackReference
		/// </summary>
		[Association(ThisKey="UserName", OtherKey="FkUserName", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<ZzAccessLog> UseraccessLogs { get; set; }

		/// <summary>
		/// usercompany_BackReference
		/// </summary>
		[Association(ThisKey="UserName", OtherKey="FkUserNameCreator", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<AnCompany> Usercompanies { get; set; }

		/// <summary>
		/// usercompany1_BackReference
		/// </summary>
		[Association(ThisKey="UserName", OtherKey="FkUserNameSafetyTech", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<AnCompany> Usercompany1BackReferences { get; set; }

		/// <summary>
		/// usercompany2_BackReference
		/// </summary>
		[Association(ThisKey="UserName", OtherKey="FkUserNameUpdater", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<AnCompany> Usercompany2BackReferences { get; set; }

		/// <summary>
		/// usercourseRegistration_BackReference
		/// </summary>
		[Association(ThisKey="UserName", OtherKey="FkUserName", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<CourseRegistration> UsercourseRegistrations { get; set; }

		/// <summary>
		/// usercourseWarning_BackReference
		/// </summary>
		[Association(ThisKey="UserName", OtherKey="FkUserName", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<CourseWarning> UsercourseWarnings { get; set; }

		/// <summary>
		/// userEE-EventRegistration_BackReference
		/// </summary>
		[Association(ThisKey="UserName", OtherKey="FkUserName", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<EeEventRegistration> UserEEEventRegistrations { get; set; }

		/// <summary>
		/// userEE-EventWarning_BackReference
		/// </summary>
		[Association(ThisKey="UserName", OtherKey="FkUserName", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<EeEventWarning> UserEEEventWarnings { get; set; }

		/// <summary>
		/// UserISO-Audit1_BackReference
		/// </summary>
		[Association(ThisKey="UserName", OtherKey="FkUserNameLastUpdate", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<IsoAudit> UserISOAudit1BackReferences { get; set; }

		/// <summary>
		/// UserISO-Audit_BackReference
		/// </summary>
		[Association(ThisKey="UserName", OtherKey="FkUserNameConsultant", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<IsoAudit> UserISOAudits { get; set; }

		/// <summary>
		/// UserISO-Chat_BackReference
		/// </summary>
		[Association(ThisKey="UserName", OtherKey="FkUserNameAuthor", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<IsoChat> UserISOChats { get; set; }

		/// <summary>
		/// UserISO-Meeting_BackReference
		/// </summary>
		[Association(ThisKey="UserName", OtherKey="FkUserName", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<IsoMeeting> UserISOMeetings { get; set; }

		/// <summary>
		/// userregistration_BackReference
		/// </summary>
		[Association(ThisKey="UserName", OtherKey="FkUserName", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<FuRegistration> Userregistrations { get; set; }

		/// <summary>
		/// UserSFT-Chat_BackReference
		/// </summary>
		[Association(ThisKey="UserName", OtherKey="FkUserNameAuthor", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<SftChat> UserSFTChats { get; set; }

		/// <summary>
		/// UserSFT-Meeting_BackReference
		/// </summary>
		[Association(ThisKey="UserName", OtherKey="FkUserName", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<SftMeeting> UserSFTMeetings { get; set; }

		/// <summary>
		/// UserSFT-YearContract1_BackReference
		/// </summary>
		[Association(ThisKey="UserName", OtherKey="FkUserNameTechAssigned", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<SftYearContract> UserSFTYearContract1BackReferences { get; set; }

		/// <summary>
		/// UserSFT-YearContract_BackReference
		/// </summary>
		[Association(ThisKey="UserName", OtherKey="FkUserNameRSPP", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<SftYearContract> UserSFTYearContracts { get; set; }

		/// <summary>
		/// useruserGroup_BackReference
		/// </summary>
		[Association(ThisKey="UserName", OtherKey="FkUserName", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.OneToMany, IsBackReference=true)]
		public IEnumerable<MmUserGroup> UseruserGroups { get; set; }

		#endregion
	}

	[Table("ZZ-accessLog")]
	public partial class ZzAccessLog
	{
		[Column(),              PrimaryKey, Identity] public int       ID         { get; set; } // Long
		/// <summary>
		/// 50 caratteri
		/// </summary>
		[Column("fk_userName"), Nullable            ] public string    FkUserName { get; set; } // VarChar(50)
		[Column("dateAccess"),  Nullable            ] public DateTime? DateAccess { get; set; } // DateTime

		#region Associations

		/// <summary>
		/// useraccessLog
		/// </summary>
		[Association(ThisKey="FkUserName", OtherKey="UserName", CanBeNull=true, Relationship=LinqToDB.Mapping.Relationship.ManyToOne, KeyName="useraccessLog", BackReferenceName="UseraccessLogs")]
		public User UseraccessLog { get; set; }

		#endregion
	}

	[Table("ZZ-release")]
	public partial class ZzRelease
	{
		[Column(),          PrimaryKey, Identity] public int       ID      { get; set; } // Long
		[Column("dataRel"), Nullable            ] public DateTime? DataRel { get; set; } // DateTime
	}

	public static partial class TableExtensions
	{
		public static AnAteco Find(this ITable<AnAteco> table, string Code)
		{
			return table.FirstOrDefault(t =>
				t.Code == Code);
		}

		public static AnCompany Find(this ITable<AnCompany> table, int ID)
		{
			return table.FirstOrDefault(t =>
				t.ID == ID);
		}

		public static AnMmAteco Find(this ITable<AnMmAteco> table, int FkIDCompany, string FkCodeAteco2007)
		{
			return table.FirstOrDefault(t =>
				t.FkIDCompany     == FkIDCompany &&
				t.FkCodeAteco2007 == FkCodeAteco2007);
		}

		public static AnSector Find(this ITable<AnSector> table, int ID)
		{
			return table.FirstOrDefault(t =>
				t.ID == ID);
		}

		public static AnSite Find(this ITable<AnSite> table, int ID)
		{
			return table.FirstOrDefault(t =>
				t.ID == ID);
		}

		public static AnWorker Find(this ITable<AnWorker> table, int ID)
		{
			return table.FirstOrDefault(t =>
				t.ID == ID);
		}

		public static CourseRegistration Find(this ITable<CourseRegistration> table, int ID)
		{
			return table.FirstOrDefault(t =>
				t.ID == ID);
		}

		public static CourseType Find(this ITable<CourseType> table, int ID)
		{
			return table.FirstOrDefault(t =>
				t.ID == ID);
		}

		public static CourseWarning Find(this ITable<CourseWarning> table, int ID)
		{
			return table.FirstOrDefault(t =>
				t.ID == ID);
		}

		public static EeEventRegistration Find(this ITable<EeEventRegistration> table, int ID)
		{
			return table.FirstOrDefault(t =>
				t.ID == ID);
		}

		public static EeEventType Find(this ITable<EeEventType> table, int ID)
		{
			return table.FirstOrDefault(t =>
				t.ID == ID);
		}

		public static EeEventWarning Find(this ITable<EeEventWarning> table, int ID)
		{
			return table.FirstOrDefault(t =>
				t.ID == ID);
		}

		public static FuFund Find(this ITable<FuFund> table, string FundName)
		{
			return table.FirstOrDefault(t =>
				t.FundName == FundName);
		}

		public static FuPlan Find(this ITable<FuPlan> table, string PlanName)
		{
			return table.FirstOrDefault(t =>
				t.PlanName == PlanName);
		}

		public static FuPlanCompany Find(this ITable<FuPlanCompany> table, string FkPlanName, int FkIDCompany)
		{
			return table.FirstOrDefault(t =>
				t.FkPlanName  == FkPlanName &&
				t.FkIDCompany == FkIDCompany);
		}

		public static FuRegistration Find(this ITable<FuRegistration> table, int ID)
		{
			return table.FirstOrDefault(t =>
				t.ID == ID);
		}

		public static Group Find(this ITable<Group> table, string GroupName)
		{
			return table.FirstOrDefault(t =>
				t.GroupName == GroupName);
		}

		public static IsoAudit Find(this ITable<IsoAudit> table, int ID)
		{
			return table.FirstOrDefault(t =>
				t.ID == ID);
		}

		public static IsoAuditor Find(this ITable<IsoAuditor> table, int ID)
		{
			return table.FirstOrDefault(t =>
				t.ID == ID);
		}

		public static IsoAuditType Find(this ITable<IsoAuditType> table, int ID)
		{
			return table.FirstOrDefault(t =>
				t.ID == ID);
		}

		public static IsoCertificationBody Find(this ITable<IsoCertificationBody> table, string Code)
		{
			return table.FirstOrDefault(t =>
				t.Code == Code);
		}

		public static IsoCertificationType Find(this ITable<IsoCertificationType> table, string Code)
		{
			return table.FirstOrDefault(t =>
				t.Code == Code);
		}

		public static IsoChat Find(this ITable<IsoChat> table, int ID)
		{
			return table.FirstOrDefault(t =>
				t.ID == ID);
		}

		public static IsoIAFSector Find(this ITable<IsoIAFSector> table, string Code)
		{
			return table.FirstOrDefault(t =>
				t.Code == Code);
		}

		public static IsoMeeting Find(this ITable<IsoMeeting> table, int ID)
		{
			return table.FirstOrDefault(t =>
				t.ID == ID);
		}

		public static IsoMmAuditCertificationType Find(this ITable<IsoMmAuditCertificationType> table, int FkIDAudit, string FkCodeCertificationType)
		{
			return table.FirstOrDefault(t =>
				t.FkIDAudit               == FkIDAudit &&
				t.FkCodeCertificationType == FkCodeCertificationType);
		}

		public static IsoMmAuditIAFSector Find(this ITable<IsoMmAuditIAFSector> table, string FkCodeIAFSector, int FkIDAudit)
		{
			return table.FirstOrDefault(t =>
				t.FkCodeIAFSector == FkCodeIAFSector &&
				t.FkIDAudit       == FkIDAudit);
		}

		public static MenuVoice Find(this ITable<MenuVoice> table, string ASPXPage)
		{
			return table.FirstOrDefault(t =>
				t.ASPXPage == ASPXPage);
		}

		public static MenuVoiceFather Find(this ITable<MenuVoiceFather> table, string ASPXPage)
		{
			return table.FirstOrDefault(t =>
				t.ASPXPage == ASPXPage);
		}

		public static MmGroupMenuVoice Find(this ITable<MmGroupMenuVoice> table, string FkASPXPage, string FkGroupName)
		{
			return table.FirstOrDefault(t =>
				t.FkASPXPage  == FkASPXPage &&
				t.FkGroupName == FkGroupName);
		}

		public static MmUserGroup Find(this ITable<MmUserGroup> table, string FkGroupName, string FkUserName)
		{
			return table.FirstOrDefault(t =>
				t.FkGroupName == FkGroupName &&
				t.FkUserName  == FkUserName);
		}

		public static SftChat Find(this ITable<SftChat> table, int ID)
		{
			return table.FirstOrDefault(t =>
				t.ID == ID);
		}

		public static SftContract Find(this ITable<SftContract> table, int FkIDCompany)
		{
			return table.FirstOrDefault(t =>
				t.FkIDCompany == FkIDCompany);
		}

		public static SftMeeting Find(this ITable<SftMeeting> table, int PerYear, int FkIDCompany, int ID)
		{
			return table.FirstOrDefault(t =>
				t.PerYear     == PerYear     &&
				t.FkIDCompany == FkIDCompany &&
				t.ID          == ID);
		}

		public static SftToDo Find(this ITable<SftToDo> table, int ID)
		{
			return table.FirstOrDefault(t =>
				t.ID == ID);
		}

		public static SftYearContract Find(this ITable<SftYearContract> table, int PerYear, int FkIDCompany)
		{
			return table.FirstOrDefault(t =>
				t.PerYear     == PerYear &&
				t.FkIDCompany == FkIDCompany);
		}

		public static User Find(this ITable<User> table, string UserName)
		{
			return table.FirstOrDefault(t =>
				t.UserName == UserName);
		}

		public static ZzAccessLog Find(this ITable<ZzAccessLog> table, int ID)
		{
			return table.FirstOrDefault(t =>
				t.ID == ID);
		}

		public static ZzRelease Find(this ITable<ZzRelease> table, int ID)
		{
			return table.FirstOrDefault(t =>
				t.ID == ID);
		}
	}
}

#pragma warning restore 1591

@fedrok777
Copy link
Author

image

@MaceWindu
Copy link
Contributor

Which type ddlCliente.SelectedValue has?

@sdanyliv sdanyliv added the status: has-pr There is active PR for issue label Dec 31, 2020
MaceWindu added a commit that referenced this issue Jan 1, 2021
* add test

* Fix for #2746. Suppressed removing method based conversions.

Co-authored-by: Svyatoslav Danyliv <sdanyliv@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

3 participants