private static async Task SaveExpanseAndUpdateEmployee(IDialogContext context, string profileKey, ExpenseReport expenseReport)
{
await DocumentDBRepository.CreateItemAsync <ExpenseReport>(expenseReport);
Employee employee = context.ConversationData.GetValue <Employee>(profileKey);
if (employee.ExpenseReportList == null)
{
employee.ExpenseReportList = new List <string>()
{
expenseReport.Id
};
}
else
{
employee.ExpenseReportList.Add(expenseReport.Id);
}
await DocumentDBRepository.UpdateItemAsync <Employee>(employee.EmailId, employee);
context.ConversationData.SetValue(profileKey, employee);
}