My application uses SQL Server with dapper and ASP.NET core 2 preview 2. I am using a repository pattern with single database. I have written a repository for each entity. In the business layer I will inject each repository with the help of a separate connection object within the transaction scope. Is this pattern a distributed transaction? Or does SQL Server treat as a local transaction. Because .NET core does not support distributed transaction? Or can I use .NET framework instead of this?
That would be a distributed transaction, and even if .NET Core allowed it, it's a bad practice.
Instead inject a single SqlConnection for both repositories, and manage the transaction on the SqlConnection.
If you don't have TransactionScope, or EF, you'll probably have to use TSQL BEGIN TRANSACTION/COMMIT explicitly on the SqlConnection, as otherwise SqlCommand must be explicitly enlisted (which you don't want to do).