internal async Task <Response <IReadOnlyDictionary <string, object> > > InsertInternalAsync(bool async, IDictionary <string, object> entity, CancellationToken cancellationToken)
        {
            Response <IReadOnlyDictionary <string, object> > response;

            if (async)
            {
                response = await _tableOperations.InsertEntityAsync(
                    _table,
                    tableEntityProperties : entity,
                    queryOptions : new QueryOptions()
                {
                    Format = _format
                },
                    cancellationToken : cancellationToken).ConfigureAwait(false);
            }
            {
                response = _tableOperations.InsertEntity(
                    _table,
                    tableEntityProperties: entity,
                    queryOptions: new QueryOptions()
                {
                    Format = _format
                },
                    cancellationToken: cancellationToken);
            }

            return(response);
        }
 public virtual Response <IReadOnlyDictionary <string, object> > Insert(IDictionary <string, object> entity, CancellationToken cancellationToken = default) =>
 _tableOperations.InsertEntity(_table,
                               tableEntityProperties: entity,
                               queryOptions: new QueryOptions()
 {
     Format = _format
 },
                               cancellationToken: cancellationToken);
        public virtual Response <ReadOnlyDictionary <string, object> > Insert(IDictionary <string, object> entity, CancellationToken cancellationToken = default)
        {
            var response = _tableOperations.InsertEntity(_table,
                                                         tableEntityProperties: entity.ToOdataAnnotatedDictionary(),
                                                         queryOptions: new QueryOptions()
            {
                Format = _format
            },
                                                         cancellationToken: cancellationToken);

            var dict = new Dictionary <string, object>((IDictionary <string, object>)response.Value);

            dict.CastAndRemoveAnnotations();

            return(Response.FromValue(new ReadOnlyDictionary <string, object>(dict), response.GetRawResponse()));
        }