public async Task <IActionResult> Post([FromBody] AssignIsOnStrategyToFeatureRequest request)
        {
            request.Validate();
            var command = request.ToAssignIsOnStrategyToFeatureCommand();

            await this._handleCommand.Handle(command);

            return(new StatusCodeResult((int)HttpStatusCode.OK));
        }
 public static AssignIsOnStrategyToFeatureCommand ToAssignIsOnStrategyToFeatureCommand(this AssignIsOnStrategyToFeatureRequest request)
 {
     return(new AssignIsOnStrategyToFeatureCommand
     {
         Name = request.Name,
         Path = request.Path,
         AssignedBy = request.AssignedBy,
         IsEnabled = request.IsOn,
     });
 }
 public static void Validate(this AssignIsOnStrategyToFeatureRequest request)
 {
     request.Required(nameof(request));
     request.Name.Required(nameof(request.Name));
     request.AssignedBy.Required(nameof(request.AssignedBy));
 }