private async Task DisplayEmployeeCard(IDialogContext context, EmployeeItem employee) { await context.SendTypingIndicator(); var replyToConversation = context.MakeMessage(); replyToConversation.Attachments = new List <Attachment> (); var card = new EmployeeCard(employee); replyToConversation.Attachments.Add(card.AsAttachment()); await context.PostAsync(replyToConversation); context.Wait(MessageReceived); }
private async Task DisplayEmployeeCard(IDialogContext context, string employeeId) { await context.SendTypingIndicator(); var employee = employees.Where(x => x.EmployeeKey == long.Parse(employeeId)).First(); var replyToConversation = context.MakeMessage(); replyToConversation.Attachments = new List <Attachment> (); var card = new EmployeeCard(employee); replyToConversation.Attachments.Add(card.AsAttachment()); await context.PostAsync(replyToConversation); context.Wait(MessageReceived); }