Differences between CDONTS, CDOSYS, CDO, CDOEX and CDOEXM?

CDONTS

 Collaboration Data Objects for Microsoft Windows NT Server (CDONTS) was a COM component that was included with NT SP4 ( cdont.dll). It allowed creating and sending email messages from web application scripts, typically ASP pages. It required a local SMTP service installed to handle mail delivery. CDONTS was deprecated in Windows 2000 and removed completely in Windows 2003.


CDOSYS 

Is a library (cdosys.dll) provided as a part of IIS. CDOSYS replaced the older CDONTS. CDOSYS enabled applications to route smtp messages across multiple platforms.CDOSYS had more functionality over the CDONTS library, providing support for MIME messages and it could be run on the client side.CDOSYS can be used from windows 2000 to windows 2008. 


CDO 1.2.1 Collaboration Data Objects (CDO)

is a technology for building messaging or collaboration applications. It allows creation of applications with messaging functionality, or to add messaging functionality to existing applications.CDO is an additional scripting interface to the Messaging Application Programming Interface (MAPI) model.CDO is available through the two CDO libraries: The CDO library and the CDO rendering library. The most important one, the CDO library allows you to send and receive mail messages and to interact with folders, attachments and address books. 


CDOEX CDO for Exchange Server (CDOEX)

provides COM classes and interfaces you can use to manage information in the exchange store. You can send messages, list inbox contents and create appointments for example. You can only use it from an Exchange Server, not from a client.CDOEX is used in applications that send and process emails, calendar, contact information as well as access programmatically mailbox and public folders.CDOEX is de-emphasized in Exchange 2007 and not supported in Exchange 2010. You can instead use Exchange Web Services and even run it from a local or remote computer unlike CDOEX.

CDOEXM

 CDO for Exchange Management (CDOEXM) provides COM classes and interfaces to manage the Exchange store. You need to install the Exchange Administrative Tools on the computer.CDOEXM is used in administrative applications and scripts to control, examine or diagnose exchange servers and stores.CDOEXM is not supported in Exchange 2007 or 2010, you can use Powershell to perform management tasks.

EntityFramework.BulkInsert...


Bulk insert extension for EntityFramework 4.1.10311+.
Insert large amount of data over 20 times faster than regular insert.
Supports DB first and code first.


https://efbulkinsert.codeplex.com/

Nuget

EF4

PM> Install-Package EntityFramework.BulkInsert-ef4
https://www.nuget.org/packages/EntityFramework.BulkInsert-ef4

EF5

PM> Install-Package EntityFramework.BulkInsert-ef5
https://www.nuget.org/packages/EntityFramework.BulkInsert-ef5

EF6

PM> Install-Package EntityFramework.BulkInsert-ef6
https://www.nuget.org/packages/EntityFramework.BulkInsert-ef6

Supports

  • All EntityFramework releases available in nuget
  • Code-First
  • Database-First (from ef 6.0.0)
  • Inserting Table-Per-Hirerachy entities
  • Inserting Table-Per-Type entities

Usage

Extension itself is in namespace EntityFramework.BulkInsert.Extensions. So to reveal the extension method add using 
using EntityFramework.BulkInsert.Extensions;

And then you can do this
context.BulkInsert(entities);


NB! This action is executed immediately in its own transaction. To combine bulk insert with DbContext, TransactionScope must be used.
using (var ctx = GetContext())
{
  using (var transactionScope = new TransactionScope())
  {
    // some stuff in dbcontext

    ctx.BulkInsert(entities);

    ctx.SaveChanges();
    transactionScope.Complete();
  }
}

Read more from documentation

Managing Packages Using the Package Manager Console...

Query Hints (Transact-SQL)...

Join Hints (Transact-SQL)...

https://technet.microsoft.com/en-us/library/ms173815.aspx

Join hints specify that the query optimizer enforce a join strategy between two tables in SQL Server 2014. For general information about joins and join syntax, see FROM (Transact-SQL).
Important note Important
Because the SQL Server query optimizer typically selects the best execution plan for a query, we recommend that hints, including <join_hint>, be used only as a last resort by experienced developers and database administrators.
Applies to:
Applies to: SQL Server (SQL Server 2008 through current version), Azure SQL Database\.

Syntax

<join_hint> ::= 
     { LOOP | HASH | MERGE | REMOTE }

Arguments

LOOP | HASH | MERGE
Specifies that the join in the query should use looping, hashing, or merging. Using LOOP |HASH | MERGE JOIN enforces a particular join between two tables. LOOP cannot be specified together with RIGHT or FULL as a join type.
REMOTE
Specifies that the join operation is performed on the site of the right table. This is useful when the left table is a local table and the right table is a remote table. REMOTE should be used only when the left table has fewer rows than the right table.
If the right table is local, the join is performed locally. If both tables are remote but from different data sources, REMOTE causes the join to be performed on the site of the right table. If both tables are remote tables from the same data source, REMOTE is not required.
REMOTE cannot be used when one of the values being compared in the join predicate is cast to a different collation using the COLLATE clause.
REMOTE can be used only for INNER JOIN operations.

Remarks

Join hints are specified in the FROM clause of a query. Join hints enforce a join strategy between two tables. If a join hint is specified for any two tables, the query optimizer automatically enforces the join order for all joined tables in the query, based on the position of the ON keywords. When a CROSS JOIN is used without the ON clause, parentheses can be used to indicate the join order.

Examples

A. Using HASH

The following example specifies that the JOIN operation in the query is performed by a HASH join. The example uses the AdventureWorks2012 database.
SELECT p.Name, pr.ProductReviewID
FROM Production.Product AS p
LEFT OUTER HASH JOIN Production.ProductReview AS pr
ON p.ProductID = pr.ProductID
ORDER BY ProductReviewID DESC;

B. Using LOOP

The following example specifies that the JOIN operation in the query is performed by a LOOP join. The example uses the AdventureWorks2012 database.
DELETE FROM Sales.SalesPersonQuotaHistory 
FROM Sales.SalesPersonQuotaHistory AS spqh
    INNER LOOP JOIN Sales.SalesPerson AS sp
    ON spqh.SalesPersonID = sp.SalesPersonID
WHERE sp.SalesYTD > 2500000.00;
GO

C. Using MERGE

The following example specifies that the JOIN operation in the query is performed by a MERGE join. The example uses the AdventureWorks2012 database.
SELECT poh.PurchaseOrderID, poh.OrderDate, pod.ProductID, pod.DueDate, poh.VendorID 
FROM Purchasing.PurchaseOrderHeader AS poh
INNER MERGE JOIN Purchasing.PurchaseOrderDetail AS pod 
    ON poh.PurchaseOrderID = pod.PurchaseOrderID;
GO

Table Hints (Transact-SQL)...

Table Value Constructor (Transact-SQL)...

Specifies a set of row value expressions to be constructed into a table. The Transact-SQL table value constructor allows multiple rows of data to be specified in a single DML statement. The table value constructor can be specified in the VALUES clause of the INSERT statement, in the USING <source table> clause of the MERGE statement, and in the definition of a derived table in the FROM clause.

https://technet.microsoft.com/en-us/library/dd776382.aspx

Examples

A. Inserting multiple rows of data

The following example creates the table dbo.Departments and then uses the table value constructor to insert five rows into the table. Because values for all columns are supplied and are listed in the same order as the columns in the table, the column names do not have to be specified in the column list.
USE AdventureWorks2012;
GO
INSERT INTO Production.UnitMeasure
VALUES (N'FT2', N'Square Feet ', '20080923'), (N'Y', N'Yards', '20080923'), (N'Y3', N'Cubic Yards', '20080923');
GO

B. Inserting multiple rows with DEFAULT and NULL values

The following example demonstrates specifying DEFAULT and NULL when using the table value constructor to insert rows into a table.
USE AdventureWorks2012;
GO
CREATE TABLE Sales.MySalesReason(
SalesReasonID int IDENTITY(1,1) NOT NULL,
Name dbo.Name NULL ,
ReasonType dbo.Name NOT NULL DEFAULT 'Not Applicable' );
GO
INSERT INTO Sales.MySalesReason 
VALUES ('Recommendation','Other'), ('Advertisement', DEFAULT), (NULL, 'Promotion');

SELECT * FROM Sales.MySalesReason;

C. Specifying multiple values as a derived table in a FROM clause

The following examples uses the table value constructor to specify multiple values in the FROM clause of a SELECT statement.
SELECT a, b FROM (VALUES (1, 2), (3, 4), (5, 6), (7, 8), (9, 10) ) AS MyTable(a, b);
GO
-- Used in an inner join to specify values to return.
SELECT ProductID, a.Name, Color
FROM Production.Product AS a
INNER JOIN (VALUES ('Blade'), ('Crown Race'), ('AWC Logo Cap')) AS b(Name) 
ON a.Name = b.Name;

D. Specifying multiple values as a derived source table in a MERGE statement

The following example uses MERGE to modify the SalesReason table by either updating or inserting rows. When the value of NewName in the source table matches a value in the Name column of the target table, (SalesReason), the ReasonType column is updated in the target table. When the value of NewName does not match, the source row is inserted into the target table. The source table is a derived table that uses the Transact-SQL table value constructor to specify multiple rows for the source table.
USE AdventureWorks2012;
GO
-- Create a temporary table variable to hold the output actions.
DECLARE @SummaryOfChanges TABLE(Change VARCHAR(20));

MERGE INTO Sales.SalesReason AS Target
USING (VALUES ('Recommendation','Other'), ('Review', 'Marketing'), ('Internet', 'Promotion'))
       AS Source (NewName, NewReasonType)
ON Target.Name = Source.NewName
WHEN MATCHED THEN
UPDATE SET ReasonType = Source.NewReasonType
WHEN NOT MATCHED BY TARGET THEN
INSERT (Name, ReasonType) VALUES (NewName, NewReasonType)
OUTPUT $action INTO @SummaryOfChanges;

-- Query the results of the table variable.
SELECT Change, COUNT(*) AS CountPerChange
FROM @SummaryOfChanges
GROUP BY Change;