Beispiel #1
0
 public static PublishFeatureCommand ToPublishFeatureCommand(this PublishFeatureRequest request)
 {
     return(new PublishFeatureCommand
     {
         Name = request.Name,
         Path = request.Path,
         PublishedBy = request.PublishedBy,
     });
 }
Beispiel #2
0
        public async Task <IActionResult> Post([FromBody] PublishFeatureRequest request)
        {
            request.Validate();
            var command = request.ToPublishFeatureCommand();

            await this._handleCommand.Handle(command);

            return(new StatusCodeResult((int)HttpStatusCode.OK));
        }
Beispiel #3
0
 public static void Validate(this PublishFeatureRequest request)
 {
     request.Required(nameof(request));
     request.Name.Required(nameof(request.Name));
     request.PublishedBy.Required(nameof(request.PublishedBy));
 }