public static Response createGetArtistsByDateResponse(Artist[] artists) { Response response = new Response { Type = Response.Types.Type.GetArtistsByDate }; foreach (var artist in artists) { Proto.Artist artistDTO = new Proto.Artist { Name = artist.Name, AvailableTicketsNumber = artist.AvailableTicketsNumber, Date = artist.Date, Location = artist.Location, }; response.Artist.Add(artistDTO); } return(response); }
public static Response CreateGetArtistsByDateResponse(csharpMusicFestival.domain.Artist[] artists) { Response response = new Response { Type = Response.Types.Type.GetArtistsByDate }; foreach (csharpMusicFestival.domain.Artist artist in artists) { Proto.Artist artistDTO = new Proto.Artist { Location = artist.Location, Date = artist.Date, Name = artist.Name, AvailableTicketsNumber = artist.AvailableTicketsNumber, }; response.Artist.Add(artistDTO); } return(response); }