diff --git a/src/Azure/Orleans.Persistence.Cosmos/CosmosGrainStorage.cs b/src/Azure/Orleans.Persistence.Cosmos/CosmosGrainStorage.cs index 99cdeba5c4..6a105c1f52 100644 --- a/src/Azure/Orleans.Persistence.Cosmos/CosmosGrainStorage.cs +++ b/src/Azure/Orleans.Persistence.Cosmos/CosmosGrainStorage.cs @@ -75,7 +75,7 @@ public async Task ReadStateAsync(string grainType, GrainId grainId, IGrainSta } else { - grainState.State = ActivatorUtilities.CreateInstance(_serviceProvider); + grainState.State = Activator.CreateInstance(); grainState.RecordExists = false; } @@ -86,7 +86,7 @@ public async Task ReadStateAsync(string grainType, GrainId grainId, IGrainSta if (dce.StatusCode == HttpStatusCode.NotFound) { // State is new, just activate a default and return - grainState.State = ActivatorUtilities.CreateInstance(_serviceProvider); + grainState.State = Activator.CreateInstance(); grainState.RecordExists = false; return; }