Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support netstandard2.0 in WorkflowCore.Persistence.EntityFramework #1041 #1057

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -391,16 +391,18 @@ public async Task ProcessCommands(DateTimeOffset asOf, Func<ScheduledCommand, Ta
{
var cursor = db.Set<PersistedScheduledCommand>()
.Where(x => x.ExecuteTime < asOf.UtcDateTime.Ticks)
.AsAsyncEnumerable();
.AsEnumerable();

await foreach (var command in cursor)
foreach (var command in cursor)
{
try
{
await action(command.ToScheduledCommand());
using var db2 = ConstructDbContext();
db2.Set<PersistedScheduledCommand>().Remove(command);
await db2.SaveChangesAsync();
using (var db2 = ConstructDbContext())
{
db2.Set<PersistedScheduledCommand>().Remove(command);
await db2.SaveChangesAsync();
}
}
catch (Exception)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<AssemblyTitle>Workflow Core EntityFramework Core Persistence Provider</AssemblyTitle>
<Authors>Daniel Gerlag</Authors>
<TargetFrameworks>netstandard2.1;net6.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
<AssemblyName>WorkflowCore.Persistence.EntityFramework</AssemblyName>
<PackageId>WorkflowCore.Persistence.EntityFramework</PackageId>
<PackageTags>workflow;.NET;Core;state machine;WorkflowCore;EntityFramework;EntityFrameworkCore</PackageTags>
Expand All @@ -25,7 +25,7 @@
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.3" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.1' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="3.1.2" />
</ItemGroup>
Expand Down