public async Task <IActionResult> Update(int id, UpdateLearningPathRequestModel model) { LearningPathDomainModel newEntity = await _mediator.Send(new UpdateLearningPathCommand(id, model)); return(CreatedAtAction(nameof(Get), new { id = newEntity.Id }, newEntity)); }
public UpdateLearningPathCommand(int learningPathId, UpdateLearningPathRequestModel model) { Model = model ?? throw new ArgumentNullException(nameof(model)); LearningPathId = learningPathId; }