Exemplo n.º 1
0
 public static IQueryable <Fascicle> GetAssociated(this IRepository <Fascicle> repository, DocumentUnit documentUnit, Entity.Fascicles.ReferenceType referenceType, bool optimization = true)
 {
     return(repository.Query(x => x.FascicleDocumentUnits.Any(fu => fu.UniqueId == documentUnit.UniqueId && fu.ReferenceType == referenceType), optimization)
            .Include(i => i.FascicleLinks.Select(f => f.FascicleLinked))
            .SelectAsQueryable());
 }
Exemplo n.º 2
0
 public static IQueryable <Fascicle> GetAssociated(this IRepository <Fascicle> repository, Protocol protocol, Entity.Fascicles.ReferenceType referenceType, bool optimization = true)
 {
     return(repository.Query(x => x.FascicleDocumentUnits.Any(fp => fp.DocumentUnit.UniqueId == protocol.UniqueId && fp.ReferenceType == referenceType && fp.DocumentUnit.Environment == (int)DSWEnvironmentType.Protocol), optimization)
            .Include(i => i.FascicleLinks.Select(f => f.FascicleLinked))
            .SelectAsQueryable());
 }