I have a ConcurrentDictionary and I am trying to make use of fastmember as per this example by marc but what I have is just an array of Guid not a complex type with properties.
So when i use
var pastTripsToDelete = new ConcurrentDictionary<int, Guid>();
var uniqueTripID = Guid.NewGuid();
pastTripsToDelete.AddOrUpdate(1, uniqueTripID, (key, oldValue) => uniqueTripID);
using(var bcp = new SqlBulkCopy(connection))
using(var reader = ObjectReader.Create(pastTripsToDelete.Values))
{
bcp.DestinationTableName = "SomeTable";
bcp.WriteToServer(reader);
}
I receive "Specified argument was out of the range of valid values", I guess it is looking for properties to map it to the columns in the table but I do not have any as it is a simple array of Guids.