Esempio n. 1
0
 public async Task Create([FromBody] CreateTrainingPlanModel model)
 {
     await _dispatcher.SendAsync <CreateTrainingPlan, Domain.TrainingPlan>(new CreateTrainingPlan
     {
         UserId = "7a0ac2d6-56b8-4e9c-b616-6a2234560860",
         Name   = model.Name
     });
 }
 public async Task <IActionResult> Post(CreateTrainingPlanModel model, CancellationToken cancellationToken)
 {
     return(await this.requestDispatcher.Dispatch <TrainingPlan, TrainingPlanModel>(new CreateTrainingPlan.Request(model.Name, model.ImageRef), cancellationToken));
 }