style(backend): apply dotnet format whitespace normalization
- Applied dotnet format to 24 files in backend/ - Corrects spacing, indentation, and formatting consistency - No functional changes to code logic Ultraworked with Sisyphus <https://github.com/code-yeongyu/oh-my-opencode> Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -18,7 +18,7 @@ public class AppDbContext : DbContext
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
base.OnModelCreating(modelBuilder);
|
||||
|
||||
|
||||
modelBuilder.ApplyConfigurationsFromAssembly(typeof(AppDbContext).Assembly);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,10 +39,11 @@ public class SaveChangesTenantInterceptor : SaveChangesInterceptor
|
||||
|
||||
private void SetTenantIdForNewEntities(DbContext? context)
|
||||
{
|
||||
if (context == null) return;
|
||||
if (context == null)
|
||||
return;
|
||||
|
||||
var tenantId = _tenantAccessor.MultiTenantContext?.TenantInfo?.Identifier;
|
||||
|
||||
|
||||
if (string.IsNullOrWhiteSpace(tenantId))
|
||||
{
|
||||
_logger.LogWarning("No tenant context available for SaveChanges");
|
||||
@@ -61,7 +62,7 @@ public class SaveChangesTenantInterceptor : SaveChangesInterceptor
|
||||
if (string.IsNullOrWhiteSpace(tenantEntity.TenantId))
|
||||
{
|
||||
tenantEntity.TenantId = tenantId;
|
||||
_logger.LogDebug("Set TenantId for entity {EntityType}: {TenantId}",
|
||||
_logger.LogDebug("Set TenantId for entity {EntityType}: {TenantId}",
|
||||
entry.Entity.GetType().Name, tenantId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ public class TenantDbConnectionInterceptor : DbConnectionInterceptor
|
||||
await base.ConnectionOpeningAsync(connection, eventData, result, cancellationToken);
|
||||
|
||||
var tenantId = _tenantAccessor.MultiTenantContext?.TenantInfo?.Identifier;
|
||||
|
||||
|
||||
if (string.IsNullOrWhiteSpace(tenantId))
|
||||
{
|
||||
_logger.LogWarning("No tenant context available for database connection");
|
||||
@@ -40,7 +40,7 @@ public class TenantDbConnectionInterceptor : DbConnectionInterceptor
|
||||
{
|
||||
await using var command = npgsqlConnection.CreateCommand();
|
||||
command.CommandText = $"SET LOCAL app.current_tenant_id = '{tenantId}'";
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
await command.ExecuteNonQueryAsync(cancellationToken);
|
||||
@@ -61,7 +61,7 @@ public class TenantDbConnectionInterceptor : DbConnectionInterceptor
|
||||
base.ConnectionOpened(connection, eventData);
|
||||
|
||||
var tenantId = _tenantAccessor.MultiTenantContext?.TenantInfo?.Identifier;
|
||||
|
||||
|
||||
if (string.IsNullOrWhiteSpace(tenantId))
|
||||
{
|
||||
_logger.LogWarning("No tenant context available for database connection");
|
||||
@@ -72,7 +72,7 @@ public class TenantDbConnectionInterceptor : DbConnectionInterceptor
|
||||
{
|
||||
using var command = npgsqlConnection.CreateCommand();
|
||||
command.CommandText = $"SET LOCAL app.current_tenant_id = '{tenantId}'";
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
command.ExecuteNonQuery();
|
||||
|
||||
Reference in New Issue
Block a user