using System; using System.Linq.Expressions; using InABox.Core; namespace Comal.Classes { public class DataEntryTagRoleEmployeeCrossGenerator : AutoEntityCrossGenerator { public override Expression> LeftProperty => x => x.Tag.ID; public override Expression> LeftMapping => x => x.Tag.ID; public override Expression> LeftLink => x => x.Role.ID; public override Expression> RightProperty => x => x.EmployeeLink.ID; public override Expression> RightMapping => x => x.Employee.ID; public override Expression> RightLink => x => x.RoleLink.ID; public override bool Distinct => true; public override Column[] IDColumns => new Column[] { new Column(x => x.Tag.ID), new Column(x => x.Employee.ID) }; } [AutoEntity(typeof(DataEntryTagRoleEmployeeCrossGenerator))] public class DataEntryTagRoleEmployee : Entity, IRemotable, IPersistent, IDataEntryTagDistributionEmployee, ILicense { public EmployeeLink Employee { get; set; } public DataEntryTagLink Tag { get; set; } } }