diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-12-28 00:50:47 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-12-28 00:50:47 +0200 |
| commit | 028cca5fd51b4e5edb183e41e4e6831028a39e44 (patch) | |
| tree | eda1e3ac087073eaba532ddb3a977dd51cccd853 /Software/Visual_Studio/Tango.BL/Builders | |
| parent | ad969db71a39b4854d744412eb6482c0391a4dd9 (diff) | |
| parent | 0fdbc932838bb6e007cfa8a0079d1880c800ed81 (diff) | |
| download | Tango-028cca5fd51b4e5edb183e41e4e6831028a39e44.tar.gz Tango-028cca5fd51b4e5edb183e41e4e6831028a39e44.zip | |
Merged Urgent-Color-Space Branch.
Diffstat (limited to 'Software/Visual_Studio/Tango.BL/Builders')
| -rw-r--r-- | Software/Visual_Studio/Tango.BL/Builders/CatalogsCollectionBuilder.cs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.BL/Builders/CatalogsCollectionBuilder.cs b/Software/Visual_Studio/Tango.BL/Builders/CatalogsCollectionBuilder.cs index fb690eb99..dd9e9a54c 100644 --- a/Software/Visual_Studio/Tango.BL/Builders/CatalogsCollectionBuilder.cs +++ b/Software/Visual_Studio/Tango.BL/Builders/CatalogsCollectionBuilder.cs @@ -37,5 +37,36 @@ namespace Tango.BL.Builders } }); } + + public virtual CatalogsCollectionBuilder WithGroups() + { + return AddQueryStep(2, (query) => + { + return query.Include(x => x.ColorCatalogsGroups); + }); + } + + public virtual CatalogsCollectionBuilder WithItems() + { + return AddQueryStep(3, (query) => + { + return query.Include(x => x.ColorCatalogsGroups.Select(y => y.ColorCatalogsItems)); + }); + } + + public virtual CatalogsCollectionBuilder WithRecipes(Rml rml = null) + { + return AddQueryStep(4, (query) => + { + if (rml != null) + { + return query.Include(x => x.ColorCatalogsGroups.Select(y => y.ColorCatalogsItems.Select(z => z.ColorCatalogsItemsRecipes.Where(r => r.RmlGuid == rml.Guid)))); + } + else + { + return query.Include(x => x.ColorCatalogsGroups.Select(y => y.ColorCatalogsItems.Select(z => z.ColorCatalogsItemsRecipes))); + } + }); + } } } |
