public static async Task <T1> InsertEntryWithLogsAsync <T1>(this IBoundClient <T1> boundClient, ILogger logger, bool resultRequired = true) where T1 : class, IDynamicsEntity
        {
            logger.LogDebug($"Executing insert entry {Environment.NewLine} {Environment.StackTrace}");
            logger.LogInformation($"Inserting type: {typeof(T1)}");
            logger.LogInformation($"Executing Dynamics Query: {await boundClient.GetCommandTextAsync()}");
            var result = await boundClient.InsertEntryAsync(resultRequired);

            logger.LogInformation($"Inserted entry with Id: {result.GetId()}");
            return(result);
        }
        public static Task <T> CreateEntryAsync <T>(this IBoundClient <T> client, bool resultRequired)
            where T : class
        {
            if (client == null)
            {
                throw new ArgumentNullException(nameof(client));
            }

            return(client.InsertEntryAsync(resultRequired));
        }
        public static Task <T> CreateEntryAsync <T>(this IBoundClient <T> client, CancellationToken cancellationToken)
            where T : class
        {
            if (client == null)
            {
                throw new ArgumentNullException(nameof(client));
            }

            return(client.InsertEntryAsync(cancellationToken));
        }
示例#4
0
 public static Task <T> CreateEntryAsync <T>(this IBoundClient <T> client, bool resultRequired)
     where T : class
 {
     return(client.InsertEntryAsync(resultRequired));
 }
示例#5
0
 public static Task <T> CreateEntryAsync <T>(this IBoundClient <T> client, CancellationToken cancellationToken)
     where T : class
 {
     return(client.InsertEntryAsync(cancellationToken));
 }
示例#6
0
 public static Task <T> CreateEntryAsync <T>(this IBoundClient <T> client)
     where T : class
 {
     return(client.InsertEntryAsync());
 }