public static void Validate(this AssignIsAfterStrategyToFeatureRequest request)
 {
     request.Required(nameof(request));
     request.Name.Required(nameof(request.Name));
     request.Value.Required(nameof(request.Value));
     request.AssignedBy.Required(nameof(request.AssignedBy));
 }
        public async Task <IActionResult> Post([FromBody] AssignIsAfterStrategyToFeatureRequest request)
        {
            request.Validate();
            var command = request.ToAssignIsAfterStrategyToFeatureCommand();

            await this._handleCommand.Handle(command);

            return(new StatusCodeResult((int)HttpStatusCode.OK));
        }
 public static AssignIsAfterStrategyToFeatureCommand ToAssignIsAfterStrategyToFeatureCommand(this AssignIsAfterStrategyToFeatureRequest request)
 {
     return(new AssignIsAfterStrategyToFeatureCommand
     {
         Name = request.Name,
         Path = request.Path,
         AssignedBy = request.AssignedBy,
         Value = request.Value.GetValueOrDefault()
     });
 }