Esempio n. 1
0
        public bool UpsertIS <T>(string tableName, T item) where T : TableEntity, new()
        {
            try
            {
                CloudTable table = gtS(tableName);

                TableOperation upsertOperation = TableOperation.InsertOrReplace(item);
                TableResult    res1            = table.Execute(upsertOperation);

                if (res1 != null)
                {
                    return(true);
                }
                else
                {
                    blog.el(item.PartitionKey + " " + item.RowKey + " UpsertI returned null");
                    return(false);
                }
            }
            catch (Exception ex1)
            {
                blog.ex(System.Reflection.MethodBase.GetCurrentMethod().Name + " " + ex1.ToString());
                return(false);
            }
        }
Esempio n. 2
0
 private void el(string s)
 {
     if (log != null)
     {
         log.el(s);
     }
 }