Skip to content

Commit

Permalink
refactor: minor edits
Browse files Browse the repository at this point in the history
  • Loading branch information
PHILLIPS71 committed Jun 3, 2024
1 parent 51af175 commit abe7680
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ public async Task StartAsync(CancellationToken cancellationToken)

if (total <= 0)
{
_logger.LogInformation("no pending migrations for database context {0}.", typeof(TDbContext).Name);
_logger.LogInformation("no pending migrations for database context {DbContext}.", typeof(TDbContext).Name);
return;
}

_logger.LogInformation("applying {0} pending migrations for database context {1}...", total, typeof(TDbContext).Name);
_logger.LogInformation("applying {Total} pending migrations for database context {DbContext}...", total, typeof(TDbContext).Name);
stopwatch.Start();
await database.Database.MigrateAsync(cancellationToken);
stopwatch.Stop();
_logger.LogInformation("successfully applied {0} migrations for database context {1} in {2} ms.", total, typeof(TDbContext).Name, stopwatch.ElapsedMilliseconds);
_logger.LogInformation("successfully applied {Total} migrations for database context {DbContext} in {Duration} ms.", total, typeof(TDbContext).Name, stopwatch.ElapsedMilliseconds);
}

public Task StopAsync(CancellationToken cancellationToken)
Expand Down
2 changes: 1 addition & 1 deletion src/Infrastructure/src/EntityFrameworkCore/ObjectHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Giantnodes.Infrastructure.EntityFrameworkCore;

public class ObjectHelper
internal static class ObjectHelper
{
/// <summary>
/// Sets the value of a property on an object using an expression representing the property.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ public async Task Send(ConsumeContext<TMessage> context, IPipe<ConsumeContext<TM
return;
}

var message = context.Message;
var result = await _validator.ValidateAsync(message, context.CancellationToken);
var result = await _validator.ValidateAsync(context.Message, context.CancellationToken);
if (result.IsValid)
{
await next.Send(context);
Expand Down

0 comments on commit abe7680

Please sign in to comment.