Use Sqlite as default db provider
This commit is contained in:
parent
3e30af74fe
commit
884f54782d
|
|
@ -1,5 +1,4 @@
|
|||
using Elsa.Activities.Primitives;
|
||||
using Elsa.Builders;
|
||||
using Elsa.Builders;
|
||||
using Elsa.Services;
|
||||
|
||||
namespace Elsa.Activities.Workflows.Workflow
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Elsa.Activities.Primitives;
|
||||
using Elsa.Services;
|
||||
using Elsa.Services.Models;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using System.Data;
|
||||
using Elsa.Caching;
|
||||
using Elsa.DistributedLock;
|
||||
using Elsa.Extensions;
|
||||
|
|
@ -15,6 +16,7 @@ using YesSql;
|
|||
using Elsa.YesSql.Provider.Sqlite.InMemory;
|
||||
using Storage.Net;
|
||||
using Storage.Net.Blobs;
|
||||
using YesSql.Provider.Sqlite;
|
||||
|
||||
namespace Elsa
|
||||
{
|
||||
|
|
@ -24,7 +26,7 @@ namespace Elsa
|
|||
{
|
||||
Services = services;
|
||||
|
||||
ConfigurePersistence = (sp, config) => config.UseInMemorySqlite();
|
||||
ConfigurePersistence = (sp, config) => config.UseSqLite("Data Source=elsa.db;Cache=Shared", IsolationLevel.ReadUncommitted);
|
||||
StorageFactory = sp => Storage.Net.StorageFactory.Blobs.InMemory();
|
||||
DistributedLockProviderFactory = sp => new DefaultLockProvider();
|
||||
SignalFactory = sp => new Signal();
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Elsa.Builders;
|
||||
using Elsa.Models;
|
||||
using Elsa.Services.Models;
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace Elsa.Samples.ContextualWorkflowHttp
|
|||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services
|
||||
.AddElsa(option => option.UsePersistence(db => db.UseSqLite("Data Source=elsa.db;Cache=Shared", IsolationLevel.ReadUncommitted)))
|
||||
.AddElsa()
|
||||
.AddHttpActivities()
|
||||
.AddConsoleActivities()
|
||||
.AddDataMigration<Migrations>()
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ namespace Elsa.Samples.CorrelationHttp
|
|||
public void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
services
|
||||
.AddElsa(option => option.UsePersistence(db => db.UseSqLite("Data Source=elsa.db;Cache=Shared", IsolationLevel.ReadUncommitted)))
|
||||
.AddElsa()
|
||||
.AddHttpActivities()
|
||||
.AddConsoleActivities()
|
||||
.AddWorkflow<RegistrationWorkflow>();
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ namespace Elsa.Samples.DeclarativeCompositeActivitiesConsole
|
|||
{
|
||||
// Create a service container with Elsa services.
|
||||
var services = new ServiceCollection()
|
||||
.AddElsa(option => option.UsePersistence(db => db.UseSqLite("Data Source=elsa.db;Cache=Shared", IsolationLevel.ReadUncommitted)))
|
||||
.AddElsa()
|
||||
.AddConsoleActivities()
|
||||
.BuildServiceProvider();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
using System.Threading.Tasks;
|
||||
using System.Data;
|
||||
using System.Threading.Tasks;
|
||||
using Elsa.Services;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using YesSql.Provider.Sqlite;
|
||||
|
||||
namespace Elsa.Samples.HelloWorldConsole
|
||||
{
|
||||
|
|
@ -19,10 +21,10 @@ namespace Elsa.Samples.HelloWorldConsole
|
|||
var startupRunner = services.GetRequiredService<IStartupRunner>();
|
||||
await startupRunner.StartupAsync();
|
||||
|
||||
// Get a workflow host.
|
||||
// Get a workflow runner.
|
||||
var workflowRunner = services.GetService<IWorkflowRunner>();
|
||||
|
||||
// Execute the workflow.
|
||||
// Run the workflow.
|
||||
await workflowRunner.RunWorkflowAsync<HelloWorld>();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
using Elsa.Activities.Console;
|
||||
using Elsa.Activities.Primitives;
|
||||
using Elsa.Builders;
|
||||
using Elsa.Services;
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace Elsa.Samples.ProgrammaticCompositeActivitiesConsole
|
|||
{
|
||||
// Create a service container with Elsa services.
|
||||
var services = new ServiceCollection()
|
||||
.AddElsa(option => option.UsePersistence(db => db.UseSqLite("Data Source=elsa.db;Cache=Shared", IsolationLevel.ReadUncommitted)))
|
||||
.AddElsa()
|
||||
.AddConsoleActivities()
|
||||
.AddActivity<CountDownActivity>()
|
||||
.AddWorkflow<CompositionWorkflow>()
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ namespace Elsa.Samples.Serialization
|
|||
{
|
||||
// Create a service container with Elsa services.
|
||||
var services = new ServiceCollection()
|
||||
.AddElsa(option => option.UsePersistence(db => db.UseSqLite("Data Source=elsa.db;Cache=Shared", IsolationLevel.ReadUncommitted)))
|
||||
.AddElsa()
|
||||
.AddConsoleActivities()
|
||||
.BuildServiceProvider();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue