public async Task Update_Event_Information() { FillData(); var command = new UpdateEventInformationCommand { Title = "AAA", Description = "BBB", Visible = false }; var response = await HttpClient.PutAsync($"/events/{_event.Id}/information/{_eventInformation.Id}", new StringContent(JsonConvert.SerializeObject(command), Encoding.UTF8, "application/json")); response.StatusCode.Should().Be(HttpStatusCode.OK); RefreshContext(); var eventInformation = Context.EventInformation.FirstOrDefault(s => s.Id == _event.Id); eventInformation.Title.Should().Be(command.Title); eventInformation.Description.Should().Be(command.Description); eventInformation.Visible.Should().Be(command.Visible); }
public async Task <IActionResult> PutCheckAttendanceGeneral(int eventId, int eventInformationId, [FromBody] UpdateEventInformationCommand command) { command.Id = eventInformationId; return(await _iMediator.Send(command)); }