diff --git a/samples/HelloCart/v2/AppV2.cs b/samples/HelloCart/v2/AppV2.cs index 123ec9d12..981f2a57a 100644 --- a/samples/HelloCart/v2/AppV2.cs +++ b/samples/HelloCart/v2/AppV2.cs @@ -30,15 +30,15 @@ public AppV2() // Add AppDbContext & related services var appTempDir = PathExt.GetApplicationTempDirectory("", true); var dbPath = appTempDir & "HelloCart_v01.db"; - services.AddDbContextFactory(b => { - b.UseSqlite($"Data Source={dbPath}"); - b.EnableSensitiveDataLogging(); + services.AddDbContextFactory(dbContext => { + dbContext.UseSqlite($"Data Source={dbPath}"); + dbContext.EnableSensitiveDataLogging(); }); - services.AddDbContextServices(b => { - b.AddOperations((_, o) => { + services.AddDbContextServices(dbContext => { + dbContext.AddOperations((_, o) => { o.UnconditionalWakeUpPeriod = TimeSpan.FromSeconds(5); }); - b.AddFileBasedOperationLogChangeTracking(dbPath + "_changed"); + dbContext.AddFileBasedOperationLogChangeTracking(dbPath + "_changed"); }); ClientServices = HostServices = services.BuildServiceProvider(); } diff --git a/samples/HelloCart/v3/AppV3.cs b/samples/HelloCart/v3/AppV3.cs index 8bc21310e..928d0db79 100644 --- a/samples/HelloCart/v3/AppV3.cs +++ b/samples/HelloCart/v3/AppV3.cs @@ -31,17 +31,17 @@ public AppV3() // Add AppDbContext & related services var appTempDir = PathExt.GetApplicationTempDirectory("", true); var dbPath = appTempDir & "HelloCart_v01.db"; - services.AddDbContextFactory(b => { - b.UseSqlite($"Data Source={dbPath}"); - b.EnableSensitiveDataLogging(); + services.AddDbContextFactory(dbContext => { + dbContext.UseSqlite($"Data Source={dbPath}"); + dbContext.EnableSensitiveDataLogging(); }); - services.AddDbContextServices(b => { - b.AddOperations((_, o) => { + services.AddDbContextServices(dbContext => { + dbContext.AddOperations((_, o) => { o.UnconditionalWakeUpPeriod = TimeSpan.FromSeconds(5); }); - b.AddFileBasedOperationLogChangeTracking(dbPath + "_changed"); - b.AddEntityResolver(); - b.AddEntityResolver((_, options) => { + dbContext.AddFileBasedOperationLogChangeTracking(dbPath + "_changed"); + dbContext.AddEntityResolver(); + dbContext.AddEntityResolver((_, options) => { // Cart is always loaded together with items options.QueryTransformer = carts => carts.Include(c => c.Items); }); diff --git a/samples/HelloCart/v4/AppV4.cs b/samples/HelloCart/v4/AppV4.cs index f0e3d0089..51b005777 100644 --- a/samples/HelloCart/v4/AppV4.cs +++ b/samples/HelloCart/v4/AppV4.cs @@ -51,15 +51,15 @@ protected IHost BuildHost(Uri baseUri) // Add AppDbContext & related services var appTempDir = PathExt.GetApplicationTempDirectory("", true); var dbPath = appTempDir & "HelloCart_v01.db"; - services.AddDbContextFactory(b => { - b.UseSqlite($"Data Source={dbPath}"); - b.EnableSensitiveDataLogging(); + services.AddDbContextFactory(dbContext => { + dbContext.UseSqlite($"Data Source={dbPath}"); + dbContext.EnableSensitiveDataLogging(); }); - services.AddDbContextServices(b => { - b.AddOperations((_, o) => { o.UnconditionalWakeUpPeriod = TimeSpan.FromSeconds(5); }); - b.AddFileBasedOperationLogChangeTracking(dbPath + "_changed"); - b.AddEntityResolver(); - b.AddEntityResolver((_, options) => { + services.AddDbContextServices(dbContext => { + dbContext.AddOperations((_, o) => { o.UnconditionalWakeUpPeriod = TimeSpan.FromSeconds(5); }); + dbContext.AddFileBasedOperationLogChangeTracking(dbPath + "_changed"); + dbContext.AddEntityResolver(); + dbContext.AddEntityResolver((_, options) => { // Cart is always loaded together with items options.QueryTransformer = carts => carts.Include(c => c.Items); }); @@ -89,8 +89,8 @@ protected IServiceProvider BuildClientServices(Uri baseUri) options.HttpClientActions.Add(httpClient => httpClient.BaseAddress = apiBaseUri); }); client.ConfigureWebSocketChannel((c, options) => { options.BaseUri = baseUri; }); - client.AddReplicaService(); - client.AddReplicaService(); + client.AddReplicaService(); + client.AddReplicaService(); }); }); return services.BuildServiceProvider(); diff --git a/samples/HelloCart/v4/Clients.cs b/samples/HelloCart/v4/Clients.cs index 6c9043b56..518352fe0 100644 --- a/samples/HelloCart/v4/Clients.cs +++ b/samples/HelloCart/v4/Clients.cs @@ -5,7 +5,7 @@ namespace Samples.HelloCart.V4 { [BasePath("product")] - public interface IProductClient + public interface IProductClientDef { [Post("edit")] Task Edit([Body] EditCommand command, CancellationToken cancellationToken); @@ -14,7 +14,7 @@ public interface IProductClient } [BasePath("cart")] - public interface ICartClient + public interface ICartClientDef { [Post("edit")] Task Edit([Body] EditCommand command, CancellationToken cancellationToken);