예제 #1
0
 public Task <int> InsertAsync <T>(T entityToInsert) where T : class
 {
     if (CurrentTransaction != null)
     {
         return(CurrentConnection.InsertAsync <T>(entityToInsert, CurrentTransaction, CommandTimeout));
     }
     using var connection = GetDbConnection(DataSourceEnum.MASTER);
     return(connection.InsertAsync <T>(entityToInsert, CurrentTransaction, CommandTimeout));
 }