Esempio n. 1
0
        /// <summary>
        /// Inserts a new registration into database.
        /// </summary>
        /// <param name="registrationEntity">The registration entity to add.</param>
        /// <returns>Operation result.</returns>
        public async Task <TableResult> Add(RegistrationEntity registrationEntity)
        {
            var tableOperation = TableOperation.Insert(registrationEntity);

            var result = await this.Table.ExecuteAsync(tableOperation);

            return(result);
        }
Esempio n. 2
0
 private static void TraceTableOperationFailure(
     RegistrationEntity registration,
     TableResult result,
     TableOperation tableOperation)
 {
     Trace.TraceError(
         string.Format(
             CultureInfo.InvariantCulture,
             "Table storage operation {3} for registration {0}:{1} " + "failed. Status code is {2}, "
             + "check http://msdn.microsoft.com/en-us/library/windowsazure/dd179438.aspx "
             + "for detailed status code information.",
             registration.PartitionKey,
             registration.RowKey,
             result.HttpStatusCode,
             tableOperation.GetType().Name));
 }