public static Idiom MapFromTable(this IdiomItem item) { return(new Idiom() { idioma = item.RowKey, quantitat = item.quantitat }); }
public static async Task Statistics( [QueueTrigger("color-added-queue", Connection = "MyTable")] Color myQueueItem, [Table("colorsStatisticsTable", Connection = "MyTable")] CloudTable table, TraceWriter log) { var idioma = myQueueItem.Traduccio.Idioma; log.Info($"Recompte: {idioma}"); // Agafa la quantitat actual de colors var quantitat = table.GetIdiomQuantitatFromTable(idioma); var item = new IdiomItem(idioma) { quantitat = quantitat + 1 }; await table.AddOrUpdateStatisticsToTable(item); log.Info($"{idioma}: {item.quantitat}"); }