Created
July 20, 2019 10:59
-
-
Save brijbaroda/eeaaae27d591bfcfbcc96487977e8be3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ConfigureServiceApiBlock : PipelineBlock<ODataConventionModelBuilder, ODataConventionModelBuilder, CommercePipelineExecutionContext> | |
{ | |
public override Task<ODataConventionModelBuilder> Run(ODataConventionModelBuilder modelBuilder, CommercePipelineExecutionContext context) | |
{ | |
Condition.Requires(modelBuilder).IsNotNull($"{this.Name}: The argument cannot be null."); | |
// Add unbound actions | |
var configuration = modelBuilder.Action("ImportSellableItems"); | |
configuration.ReturnsFromEntitySet<CommerceCommand>("Commands"); | |
var configurationInventory = modelBuilder.Action("ImportInvenotrySellableItems"); | |
configurationInventory.ReturnsFromEntitySet<CommerceCommand>("Commands"); | |
return Task.FromResult(modelBuilder); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment