private string GetInsertValues(LookupValue arg, int idx) { string Id = (arg.Index ?? (idx + 1)).ToString(), Name = $"'{arg.Name}'", Description = $"N'{arg.Description}'"; List<string> insertValues = new List<string> { Id, Name, Description }; insertValues.AddRange( arg.OtherColumns.Select(Convert.ToBoolean) .Select(v => v ? "1" : "0")); if (LookupContext.Atom.AdditionalInfo.Temporal.HasTemporal.GetValueOrDefault()) { insertValues.Add($"'{DateTime.UtcNow.ToString()}'"); insertValues.Add($"'{DateTime.UtcNow.ToString()}'"); } if (LookupContext.Atom.AdditionalInfo.UseSoftDeletes.GetValueOrDefault()) { insertValues.Add(arg.IsDeleted ? "1" : "0"); } return $@"{string.Join(", ", insertValues)}"; }
private string GetInsertValues(LookupValue arg, int idx) { string Id = (arg.Index ?? (idx + 1)).ToString(), Name = $"'{arg.Name}'", Description = $"N'{arg.Description}'"; List<string> insertValues = new List<string> { Id, Name, Description }; insertValues.AddRange( arg.OtherColumns.Select(Convert.ToBoolean) .Select(v => v ? "1" : "0")); return $@"({string.Join(", ", insertValues)})"; }