public async Task <ActionResult> Create(QnAKBEntity entity) { entity.RowKey = entity.QnAKBID; var result = await _tableWrapper.Insert <QnAKBEntity>(entity); return(RedirectToAction("Index", new { id = entity.PartitionKey })); }
public async Task <ActionResult> Create(LuisEntity entity) { entity.PartitionKey = LuisEntity.STR_PARTITION_KEY; entity.RowKey = entity.AppId; var result = await _tableWrapper.Insert <LuisEntity>(entity); return(RedirectToAction("Index")); }
public async Task LogarLuisQna(string luisAppID, object context, object result, object qnaMakerAnswer, object feedback = null) { try { LogEntity log = new LogEntity(luisAppID); if (context != null) { log.Context = JsonConvert.SerializeObject(context); } if (result != null) { log.LuisResult = JsonConvert.SerializeObject(result); } if (qnaMakerAnswer != null) { log.QnAResult = JsonConvert.SerializeObject(qnaMakerAnswer); } if (feedback != null) { log.Feedback = JsonConvert.SerializeObject(feedback); } await table.Insert(log); log = null; } catch (Exception) { //depois colocr handle para gravar em outro lugar } }