public async Task <string> BuildConfirmEmailBody(Reservation reservation) { var template = "Templates.ReservationConfirmation"; reservation.Room = await roomService.FindRoomWithAllProperties(reservation.RoomId); RazorParser renderer = new RazorParser(typeof(EmailClient).Assembly, memoryCache); var body = renderer.UsingTemplateFromEmbedded(template, new ReservationConfirmationEmail { Reservation = reservation, BedTypes = bedService.GetBedTypesAsString(reservation.Room.RoomBeds) }); return(body); }