public Task <CreateSliderCommandResponse> Handle(CreateSliderCommand command) { var slider = new Slider(Guid.NewGuid(), command.ImageName, _repository.AsQuery().Count(), command.SliderType); _repository.Add(slider); return(Task.FromResult(new CreateSliderCommandResponse())); }
/// <summary> /// ایجاد اسلایدر /// </summary> /// <param name="command"></param> /// <returns></returns> public async Task <IHttpActionResult> Post(CreateSliderCommand command) { var response = await Bus.Send <CreateSliderCommand, CreateSliderCommandResponse>(command); return(Ok(response)); }