| Models | Examples |
|---|---|
| Display ads | Yahoo! |
| Search ads |
##git mergetool
In the middle file (future merged file), you can navigate between conflicts with ]c and [c.
Choose which version you want to keep with :diffget //2 or :diffget //3 (the //2 and //3 are unique identifiers for the target/master copy and the merge/branch copy file names).
:diffupdate (to remove leftover spacing issues)
:only (once you’re done reviewing all conflicts, this shows only the middle/merged file)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static void BulkInsert<T>(string connection, string tableName, IList<T> list) | |
| { | |
| using (var bulkCopy = new SqlBulkCopy(connection)) | |
| { | |
| bulkCopy.BatchSize = list.Count; | |
| bulkCopy.DestinationTableName = tableName; | |
| var table = new DataTable(); | |
| var props = TypeDescriptor.GetProperties(typeof(T)) | |
| //Dirty hack to make sure we only have system data types |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var imports = new List<Product>(); | |
| //Load up the imports | |
| //Pass in cnx, tablename, and list of imports | |
| BulkInsert(context.Database.Connection.ConnectionString, "Products", imports); |
OlderNewer