I uses BulkMerge method of Entity Framework Extensions for insert/update large collections of entities. Entity table have identity column Id that u
BulkMerge
Id