public async Task <IActionResult> FindTheater( [FromRoute] Guid theaterId, [FromServices] TheaterReadModelFacade readModelFacade) { TheaterDto theater = await readModelFacade.FindTheater(theaterId); return(theater == null?NotFound() : (IActionResult)Ok(theater)); }
public static Theater Convert(TheaterDto from) { return(new Theater() { Id = from.Id, Name = from.Name, Location = from.Location, Map = from.Map, Cordinates = from.Cordinates }); }
internal static TheaterViewModel Translate(TheaterDto source) { return(new TheaterViewModel { Id = source.Id, Name = source.Name, SeatRowCount = source.SeatRowCount, SeatColumnCount = source.SeatColumnCount, CreatedAt = source.CreatedAt, }); }