How can I use Fast Member to Bulk Copy data into a table with inconsistent column names?
问题 I have a Person table with following column names: Id, Name, Dob I also have a poco as: public class Person { public int Id {get; set;} public string Name {get; set;} public string DateOfBirth {get; set;} } I am then trying: var people = new List<Person>(); ... // added a bunch of people using (var bcp = new SqlBulkCopy(sqlConnection, SqlBulkCopyOptions.TableLock, transaction)) using (var reader = ObjectReader.Create(people, "Id", "Name", "Dob")) { bcp.BulkCopyTimeout = 120; bcp.BatchSize = 0