public async Task <IActionResult> Put([FromBody] UpdateEventSeatViewModel updateModel) { var result = await this.Mediator.Send( updateModel.ProjectedAs <PresenterUpdateEventSeatCommand>()); return(this.GetResult(result)); }
public void SetUpConverterUpdateCommandShould() { this.UpdateAreaViewModel = new UpdateAreaViewModel { Id = 1, LayoutId = 1, Description = "UpdateAreaViewModelDescription", CoordX = 2, CoordY = 3 }; this.UpdateEventAreaViewModel = new UpdateEventAreaViewModel { Id = 2, CoordX = 1, CoordY = 2, Description = "UpdateEventAreaViewModelDescription", EventId = 11, Price = 123142M }; this.UpdateEventViewModel = new UpdateEventViewModel { Id = 3, Name = "EventName1", Banner = "EventBanner1", Description = "EventDescription1", RunTime = TimeSpan.FromHours(1), StartAt = new DateTime(2019, 1, 17, 18, 30, 0), LayoutId = 1 }; this.UpdateEventSeatViewModel = new UpdateEventSeatViewModel { Id = 4, EventAreaId = 1, Row = 2, Number = 3, State = 4 }; this.UpdateLayoutViewModel = new UpdateLayoutViewModel { Id = 5, VenueId = 1, Description = "LayoutDescription1" }; this.UpdateSeatViewModel = new UpdateSeatViewModel { Id = 6, AreaId = 1, Row = 1, Number = 1 }; this.UpdateVenueViewModel = new UpdateVenueViewModel { Id = 7, Description = "VenueDescription1", Address = "VenueAddress1", Phone = "VenuePhone1" }; }