public async Task <ActionResult <QuestionDto> > CreateQuestionWithImage( [ModelBinder(BinderType = typeof(JsonModelBinder))] CreateQuestions.CreateQuestionsCommand command, [FromForm] IList <IFormFile> files) { command.File = files[0]; return(await Mediator.Send(command)); }
public async Task <ActionResult <QuestionDto> > CreateQuestion(CreateQuestions.CreateQuestionsCommand command) { return(await Mediator.Send(command)); }