mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Add context factory.
This commit is contained in:
1
.idea/.idea.DiscImageChef/.idea/contentModel.xml
generated
1
.idea/.idea.DiscImageChef/.idea/contentModel.xml
generated
@@ -296,6 +296,7 @@
|
||||
</e>
|
||||
<e p="DiscImageChef.Database" t="IncludeRecursive">
|
||||
<e p="Context.cs" t="Include" />
|
||||
<e p="ContextFactory.cs" t="Include" />
|
||||
<e p="DiscImageChef.Database.csproj" t="IncludeRecursive" />
|
||||
<e p="Migrations" t="Include">
|
||||
<e p="20181126222301_DeviceReportV2.Designer.cs" t="Include" />
|
||||
|
||||
9
DiscImageChef.Database/ContextFactory.cs
Normal file
9
DiscImageChef.Database/ContextFactory.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using Microsoft.EntityFrameworkCore.Design;
|
||||
|
||||
namespace DiscImageChef.Database
|
||||
{
|
||||
public class DicContextFactory : IDesignTimeDbContextFactory<DicContext>
|
||||
{
|
||||
public DicContext CreateDbContext(string[] args) => DicContext.Create("discimagechef.db");
|
||||
}
|
||||
}
|
||||
@@ -58,6 +58,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Context.cs" />
|
||||
<Compile Include="ContextFactory.cs" />
|
||||
<Compile Include="Migrations\20181126222301_DeviceReportV2.cs" />
|
||||
<Compile Include="Migrations\20181126222301_DeviceReportV2.Designer.cs" />
|
||||
<Compile Include="Migrations\20181127001622_AddDeviceBasicFields.cs" />
|
||||
|
||||
Reference in New Issue
Block a user