Skip to content

Commit a8ba413

Browse files
authored
Merge pull request #10 from richardgergely/feature/state-machine-time-provider
Állapotgépben .net-es time provider +semver:minor
2 parents aa6f79c + 3b77bb1 commit a8ba413

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/AutSoft.Core/StateMachines/EntityStateMachineBase.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ protected EntityStateMachineBase(
3737
TEntity entity,
3838
Expression<Func<TEntity, TState>> statePropertySelector,
3939
Expression<Func<TEntity, DateTimeOffset>>? stateModifiedDatePropertySelector = null,
40-
ITimeProvider? timeProvider = null,
40+
System.TimeProvider? timeProvider = null,
4141
DbContext? dbContext = null,
4242
string? exceptionMessage = null)
4343
: base(
@@ -52,7 +52,7 @@ protected EntityStateMachineBase(
5252

5353
OnTransitionCompletedAsync(async _ =>
5454
{
55-
stateModifiedDatePropertySelector?.GetPropertyAccess().SetValue(entity, timeProvider?.Now);
55+
stateModifiedDatePropertySelector?.GetPropertyAccess().SetValue(entity, timeProvider?.GetLocalNow());
5656

5757
if (dbContext != null)
5858
await dbContext.SaveChangesAsync();

0 commit comments

Comments
 (0)