Bulk Update in C#
For inserting a huge amount of data in a database, I used to collect all the inserting information into a list and convert this list into a DataTable . I then insert that list to a database via SqlBulkCopy . Where I send my generated list LiMyList which contain information of all bulk data which I want to insert to database and pass it to my bulk insertion operation InsertData(LiMyList, "MyTable"); Where InsertData is public static void InsertData<T>(List<T> list,string TableName) { DataTable dt = new DataTable("MyTable"); clsBulkOperation blk = new clsBulkOperation(); dt = ConvertToDataTable