diff --git a/FAnsiSql/Connections/ManagedConnection.cs b/FAnsiSql/Connections/ManagedConnection.cs
index 9eac22b9..d27658d2 100644
--- a/FAnsiSql/Connections/ManagedConnection.cs
+++ b/FAnsiSql/Connections/ManagedConnection.cs
@@ -9,13 +9,13 @@ namespace FAnsi.Connections;
public sealed class ManagedConnection : IManagedConnection
{
///
- public DbConnection Connection { get; private set; }
+ public DbConnection Connection { get; }
///
- public DbTransaction Transaction { get; private set; }
+ public DbTransaction Transaction { get; }
///
- public IManagedTransaction ManagedTransaction { get; private set; }
+ public IManagedTransaction ManagedTransaction { get; }
///
public bool CloseOnDispose { get; set; }
diff --git a/FAnsiSql/Connections/ManagedTransaction.cs b/FAnsiSql/Connections/ManagedTransaction.cs
index 4d51d993..100b34e0 100644
--- a/FAnsiSql/Connections/ManagedTransaction.cs
+++ b/FAnsiSql/Connections/ManagedTransaction.cs
@@ -8,10 +8,10 @@ namespace FAnsi.Connections;
public sealed class ManagedTransaction : IManagedTransaction
{
///
- public DbConnection Connection { get; private set; }
+ public DbConnection Connection { get; }
///
- public DbTransaction Transaction { get; private set; }
+ public DbTransaction Transaction { get; }
internal ManagedTransaction(DbConnection connection, DbTransaction transaction)
{
@@ -19,17 +19,17 @@ internal ManagedTransaction(DbConnection connection, DbTransaction transaction)
Transaction = transaction;
}
- private bool closed;
+ private bool _closed;
///
/// Attempts to rollback the DbTransaction (swallowing any Exception) and closes/disposes the DbConnection
///
public void AbandonAndCloseConnection()
{
- if(closed)
+ if(_closed)
return;
- closed = true;
+ _closed = true;
try
{
@@ -51,10 +51,10 @@ public void AbandonAndCloseConnection()
///
public void CommitAndCloseConnection()
{
- if(closed)
+ if(_closed)
return;
- closed = true;
+ _closed = true;
try
{
diff --git a/FAnsiSql/Discovery/Constraints/DiscoveredRelationship.cs b/FAnsiSql/Discovery/Constraints/DiscoveredRelationship.cs
index 46fbe19c..c40d457d 100644
--- a/FAnsiSql/Discovery/Constraints/DiscoveredRelationship.cs
+++ b/FAnsiSql/Discovery/Constraints/DiscoveredRelationship.cs
@@ -25,12 +25,12 @@ public sealed class DiscoveredRelationship(string fkName, DiscoveredTable pkTabl
///
/// The table in which the primary key is declared. This is the parent table.
///
- public DiscoveredTable PrimaryKeyTable { get; private set; } = pkTable;
+ public DiscoveredTable PrimaryKeyTable { get; } = pkTable;
///
/// The table which contains child records.
///
- public DiscoveredTable ForeignKeyTable { get; private set; } = fkTable;
+ public DiscoveredTable ForeignKeyTable { get; } = fkTable;
///
/// Mapping of primary key column(s) in to foreign key column(s) in . If there are more than one entry
@@ -64,6 +64,5 @@ public void AddKeys(string primaryKeyCol, string foreignKeyCol,IManagedTransacti
_pkColumns.Single(c=>c.GetRuntimeName().Equals(primaryKeyCol,StringComparison.CurrentCultureIgnoreCase)),
_fkColumns.Single(c => c.GetRuntimeName().Equals(foreignKeyCol, StringComparison.CurrentCultureIgnoreCase))
);
-
}
}
\ No newline at end of file
diff --git a/FAnsiSql/Discovery/DiscoveredDatabase.cs b/FAnsiSql/Discovery/DiscoveredDatabase.cs
index 8d0c1f52..92e69f9c 100644
--- a/FAnsiSql/Discovery/DiscoveredDatabase.cs
+++ b/FAnsiSql/Discovery/DiscoveredDatabase.cs
@@ -14,7 +14,7 @@ namespace FAnsi.Discovery;
///
/// Cross database type reference to a specific database on a database server. Allows you to create tables, drop check existance etc.
///
-public sealed class DiscoveredDatabase :IHasRuntimeName,IMightNotExist
+public sealed class DiscoveredDatabase : IHasRuntimeName, IMightNotExist
{
private readonly string _database;
private readonly IQuerySyntaxHelper _querySyntaxHelper;
@@ -22,12 +22,12 @@ public sealed class DiscoveredDatabase :IHasRuntimeName,IMightNotExist
///
/// The server on which the database exists
///
- public DiscoveredServer Server { get; private set; }
+ public DiscoveredServer Server { get; }
///
/// Stateless helper class with DBMS specific implementation of the logic required by .
///
- public IDiscoveredDatabaseHelper Helper { get; private set; }
+ public IDiscoveredDatabaseHelper Helper { get; }
///
/// API constructor, instead use instead.
diff --git a/FAnsiSql/Discovery/QuerySyntax/TopXResponse.cs b/FAnsiSql/Discovery/QuerySyntax/TopXResponse.cs
index f1e02195..b53e84f3 100644
--- a/FAnsiSql/Discovery/QuerySyntax/TopXResponse.cs
+++ b/FAnsiSql/Discovery/QuerySyntax/TopXResponse.cs
@@ -6,6 +6,6 @@
///
public sealed class TopXResponse(string sql, QueryComponent location)
{
- public string SQL { get; set; } = sql;
- public QueryComponent Location { get; set; } = location;
+ public string SQL { get; } = sql;
+ public QueryComponent Location { get; } = location;
}
\ No newline at end of file