private ICollection <string> GetColumnNames(InsertCommandContext insertCommandContext)
        {
            var generatedKey = insertCommandContext.GetGeneratedKeyContext();

            if (generatedKey != null && generatedKey.IsGenerated())
            {
                ICollection <string> result = new LinkedList <string>(insertCommandContext.GetColumnNames());
                result.Remove(generatedKey.GetColumnName());
                return(result);
            }

            return(insertCommandContext.GetColumnNames());
        }
Exemple #2
0
        private List <String> GetColumnNames(InsertCommandContext insertCommandContext)
        {
            var generatedKey = insertCommandContext.GetGeneratedKeyContext();

            ShardingAssert.ShouldBeNotNull(generatedKey, "generatedKey is required");
            List <String> result = new List <string>(insertCommandContext.GetColumnNames());

            result.Remove(generatedKey.GetColumnName());
            result.Add(generatedKey.GetColumnName());
            return(result);
        }