public static void Validate(this UnAssignStrategyRequest request)
 {
     request.Required(nameof(request));
     request.Name.Required(nameof(request.Name));
     request.StrategyName.Required(nameof(request.StrategyName));
     request.UnassignedBy.Required(nameof(request.UnassignedBy));
 }
        public async Task <IActionResult> Post([FromBody] UnAssignStrategyRequest request)
        {
            request.Validate();
            var command = request.ToUnAssignStrategyCommand();

            await this._handleCommand.Handle(command);

            return(new StatusCodeResult((int)HttpStatusCode.OK));
        }
 public static UnAssignStrategyCommand ToUnAssignStrategyCommand(this UnAssignStrategyRequest request)
 {
     return(new UnAssignStrategyCommand
     {
         Name = request.Name,
         Path = request.Path,
         UnassignedBy = request.UnassignedBy,
         StrategyName = request.StrategyName,
     });
 }