Skip to content

Commit 84011fe

Browse files
committed
Testing application resilience
1 parent 6864c46 commit 84011fe

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

Program.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
builder.Services.AddRazorPages();
1313

1414
builder.Services.AddDbContext<InventoryDbContext>(options =>
15-
options.UseMySQL(builder.Configuration.GetConnectionString("AZURE_MYSQL_CONNECTIONSTRING")));
15+
//options.UseMySQL(builder.Configuration.GetConnectionString("AZURE_MYSQL_CONNECTIONSTRING"))
16+
options.UseInMemoryDatabase("TechInventoryDB");
17+
);
1618

1719
builder.Services.AddScoped<IUnitOfWork, UnitOfWork>();
1820
builder.Services.AddScoped<IDeviceService, DeviceService>();

TechInventory.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1313
<PrivateAssets>all</PrivateAssets>
1414
</PackageReference>
15+
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.0" />
1516
<PackageReference Include="MySql.EntityFrameworkCore" Version="8.0.0" />
1617
</ItemGroup>
1718

0 commit comments

Comments
 (0)