mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 11:14:27 +00:00
Move database context, migrations and models to separate project.
This commit is contained in:
20
Aaru.Server.Database/Aaru.Server.Database.csproj
Normal file
20
Aaru.Server.Database/Aaru.Server.Database.csproj
Normal file
@@ -0,0 +1,20 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Aaru.CommonTypes" Version="6.0.0-alpha8"/>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.0"/>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.0"/>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="6.0.0"/>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.0"/>
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.0"/>
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0"/>
|
||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.0"/>
|
||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql.Design" Version="1.1.2"/>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -32,17 +32,21 @@
|
||||
|
||||
using System.Data.Common;
|
||||
using Aaru.CommonTypes.Metadata;
|
||||
using Aaru.Server.Database.Models;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using OperatingSystem = Aaru.Server.Database.Models.OperatingSystem;
|
||||
using Version = Aaru.Server.Database.Models.Version;
|
||||
|
||||
namespace Aaru.Server.Models;
|
||||
namespace Aaru.Server.Database;
|
||||
|
||||
public sealed class AaruServerContext : IdentityDbContext<IdentityUser>
|
||||
public sealed class DbContext : IdentityDbContext<IdentityUser>
|
||||
{
|
||||
public AaruServerContext() {}
|
||||
public DbContext() {}
|
||||
|
||||
public AaruServerContext(DbContextOptions<AaruServerContext> options) : base(options) {}
|
||||
public DbContext(DbContextOptions<DbContext> options) : base(options) {}
|
||||
|
||||
public DbSet<Device> Devices { get; set; }
|
||||
public DbSet<UploadedReport> Reports { get; set; }
|
||||
@@ -338,7 +342,7 @@ public sealed class AaruServerContext : IdentityDbContext<IdentityUser>
|
||||
|
||||
internal static bool TableExists(string tableName)
|
||||
{
|
||||
using var db = new AaruServerContext();
|
||||
using var db = new DbContext();
|
||||
|
||||
DbConnection connection = db.Database.GetDbConnection();
|
||||
connection.Open();
|
||||
@@ -1,14 +1,13 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Aaru.Server.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
namespace Aaru.Server.Migrations
|
||||
namespace Aaru.Server.Database.Migrations
|
||||
{
|
||||
[DbContext(typeof(AaruServerContext))]
|
||||
[DbContext(typeof(DbContext))]
|
||||
[Migration("20191102132240_InitialMigration")]
|
||||
partial class InitialMigration
|
||||
{
|
||||
@@ -1,47 +1,46 @@
|
||||
using Aaru.Server.Models;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Aaru.Server.Migrations
|
||||
namespace Aaru.Server.Database.Migrations
|
||||
{
|
||||
public partial class InitialMigration : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
#region Check for old tables
|
||||
bool atasExists = AaruServerContext.TableExists("Atas");
|
||||
bool blockDescriptorsExists = AaruServerContext.TableExists("BlockDescriptors");
|
||||
bool chsExists = AaruServerContext.TableExists("Chs");
|
||||
bool commandsExists = AaruServerContext.TableExists("Commands");
|
||||
bool compactDiscOffsetsExists = AaruServerContext.TableExists("CompactDiscOffsets");
|
||||
bool densityCodesExists = AaruServerContext.TableExists("DensityCodes");
|
||||
bool devicesExists = AaruServerContext.TableExists("Devices");
|
||||
bool deviceStatsExists = AaruServerContext.TableExists("DeviceStats");
|
||||
bool filesystemsExists = AaruServerContext.TableExists("Filesystems");
|
||||
bool filtersExists = AaruServerContext.TableExists("Filters");
|
||||
bool fireWiresExists = AaruServerContext.TableExists("FireWires");
|
||||
bool mediaExists = AaruServerContext.TableExists("Media");
|
||||
bool mediaFormatsExists = AaruServerContext.TableExists("MediaFormats");
|
||||
bool mmcFeaturesExists = AaruServerContext.TableExists("MmcFeatures");
|
||||
bool mmcsExists = AaruServerContext.TableExists("Mmcs");
|
||||
bool mmcSdsExists = AaruServerContext.TableExists("MmcSds");
|
||||
bool operatingSystemsExists = AaruServerContext.TableExists("OperatingSystems");
|
||||
bool partitionsExists = AaruServerContext.TableExists("Partitions");
|
||||
bool pcmciasExists = AaruServerContext.TableExists("Pcmcias");
|
||||
bool scsiModesExists = AaruServerContext.TableExists("ScsiModes");
|
||||
bool scsiPagesExists = AaruServerContext.TableExists("ScsiPages");
|
||||
bool scsisExists = AaruServerContext.TableExists("Scsis");
|
||||
bool sscsExists = AaruServerContext.TableExists("Sscs");
|
||||
bool sscSupportedMediasExists = AaruServerContext.TableExists("SscSupportedMedias");
|
||||
bool supportedDensitiesExists = AaruServerContext.TableExists("SupportedDensities");
|
||||
bool testedMediasExists = AaruServerContext.TableExists("TestedMedias");
|
||||
bool testedSequentialMediasExists = AaruServerContext.TableExists("TestedSequentialMedias");
|
||||
bool uploadedReportsExists = AaruServerContext.TableExists("UploadedReports");
|
||||
bool usbProductsExists = AaruServerContext.TableExists("UsbProducts");
|
||||
bool usbsExists = AaruServerContext.TableExists("Usbs");
|
||||
bool usbVendorsExists = AaruServerContext.TableExists("UsbVendors");
|
||||
bool versionsExists = AaruServerContext.TableExists("Versions");
|
||||
bool efExists = AaruServerContext.TableExists("__MigrationHistory");
|
||||
bool atasExists = DbContext.TableExists("Atas");
|
||||
bool blockDescriptorsExists = DbContext.TableExists("BlockDescriptors");
|
||||
bool chsExists = DbContext.TableExists("Chs");
|
||||
bool commandsExists = DbContext.TableExists("Commands");
|
||||
bool compactDiscOffsetsExists = DbContext.TableExists("CompactDiscOffsets");
|
||||
bool densityCodesExists = DbContext.TableExists("DensityCodes");
|
||||
bool devicesExists = DbContext.TableExists("Devices");
|
||||
bool deviceStatsExists = DbContext.TableExists("DeviceStats");
|
||||
bool filesystemsExists = DbContext.TableExists("Filesystems");
|
||||
bool filtersExists = DbContext.TableExists("Filters");
|
||||
bool fireWiresExists = DbContext.TableExists("FireWires");
|
||||
bool mediaExists = DbContext.TableExists("Media");
|
||||
bool mediaFormatsExists = DbContext.TableExists("MediaFormats");
|
||||
bool mmcFeaturesExists = DbContext.TableExists("MmcFeatures");
|
||||
bool mmcsExists = DbContext.TableExists("Mmcs");
|
||||
bool mmcSdsExists = DbContext.TableExists("MmcSds");
|
||||
bool operatingSystemsExists = DbContext.TableExists("OperatingSystems");
|
||||
bool partitionsExists = DbContext.TableExists("Partitions");
|
||||
bool pcmciasExists = DbContext.TableExists("Pcmcias");
|
||||
bool scsiModesExists = DbContext.TableExists("ScsiModes");
|
||||
bool scsiPagesExists = DbContext.TableExists("ScsiPages");
|
||||
bool scsisExists = DbContext.TableExists("Scsis");
|
||||
bool sscsExists = DbContext.TableExists("Sscs");
|
||||
bool sscSupportedMediasExists = DbContext.TableExists("SscSupportedMedias");
|
||||
bool supportedDensitiesExists = DbContext.TableExists("SupportedDensities");
|
||||
bool testedMediasExists = DbContext.TableExists("TestedMedias");
|
||||
bool testedSequentialMediasExists = DbContext.TableExists("TestedSequentialMedias");
|
||||
bool uploadedReportsExists = DbContext.TableExists("UploadedReports");
|
||||
bool usbProductsExists = DbContext.TableExists("UsbProducts");
|
||||
bool usbsExists = DbContext.TableExists("Usbs");
|
||||
bool usbVendorsExists = DbContext.TableExists("UsbVendors");
|
||||
bool versionsExists = DbContext.TableExists("Versions");
|
||||
bool efExists = DbContext.TableExists("__MigrationHistory");
|
||||
#endregion
|
||||
|
||||
#region Drop old restrictions
|
||||
@@ -1706,13 +1705,13 @@ VolumeLevelsSql FROM MmcFeatures_old WHERE VolumeLevelsSql < 0");
|
||||
CanReadATIP, CanReadBCA, CanReadC2Pointers, CanReadCMI, CanReadCorrectedSubchannel,
|
||||
CanReadCorrectedSubchannelWithC2, CanReadDCB, CanReadDDS, CanReadDMI, CanReadDiscInformation,
|
||||
CanReadFullTOC, CanReadHDCMI, CanReadLayerCapacity, CanReadFirstTrackPreGap, CanReadLeadIn,
|
||||
CanReadLeadOut, CanReadMediaID, CanReadMediaSerial, CanReadPAC, CanReadPFI, CanReadPMA,
|
||||
CanReadPQSubchannel, CanReadPQSubchannelWithC2, CanReadPRI, CanReadRWSubchannel,
|
||||
CanReadLeadOut, CanReadMediaID, CanReadMediaSerial, CanReadPAC, CanReadPFI, CanReadPMA,
|
||||
CanReadPQSubchannel, CanReadPQSubchannelWithC2, CanReadPRI, CanReadRWSubchannel,
|
||||
CanReadRWSubchannelWithC2, CanReadRecordablePFI, CanReadSpareAreaInformation, CanReadTOC, Density,
|
||||
LongBlockSize, Manufacturer, MediaIsRecognized, MediumType, MediumTypeName, Model,
|
||||
SupportsHLDTSTReadRawDVD, SupportsNECReadCDDA, SupportsPioneerReadCDDA, SupportsPioneerReadCDDAMSF,
|
||||
SupportsPlextorReadCDDA, SupportsPlextorReadRawDVD, SupportsRead10, SupportsRead12, SupportsRead16,
|
||||
SupportsRead6, SupportsReadCapacity16, SupportsReadCapacity, SupportsReadCd, SupportsReadCdMsf,
|
||||
LongBlockSize, Manufacturer, MediaIsRecognized, MediumType, MediumTypeName, Model,
|
||||
SupportsHLDTSTReadRawDVD, SupportsNECReadCDDA, SupportsPioneerReadCDDA, SupportsPioneerReadCDDAMSF,
|
||||
SupportsPlextorReadCDDA, SupportsPlextorReadRawDVD, SupportsRead10, SupportsRead12, SupportsRead16,
|
||||
SupportsRead6, SupportsReadCapacity16, SupportsReadCapacity, SupportsReadCd, SupportsReadCdMsf,
|
||||
SupportsReadCdRaw, SupportsReadCdMsfRaw, SupportsReadLong16, SupportsReadLong, ModeSense6Data,
|
||||
ModeSense10Data, CHSId, CurrentCHSId, LBASectors, LBA48Sectors, LogicalAlignment, NominalRotationRate,
|
||||
PhysicalBlockSize, SolidStateDevice, UnformattedBPT, UnformattedBPS, SupportsReadDmaLba, SupportsReadDmaRetryLba,
|
||||
@@ -1720,9 +1719,9 @@ VolumeLevelsSql FROM MmcFeatures_old WHERE VolumeLevelsSql < 0");
|
||||
SupportsReadDmaLba48, SupportsReadLba48, SupportsReadDma, SupportsReadDmaRetry, SupportsReadRetry,
|
||||
SupportsReadSectors, SupportsReadLongRetry, SupportsSeek, CanReadingIntersessionLeadIn,
|
||||
CanReadingIntersessionLeadOut, IntersessionLeadInData, IntersessionLeadOutData, BlocksSql,
|
||||
BlockSizeSql, LongBlockSizeSql, LBASectorsSql, LBA48SectorsSql, LogicalAlignmentSql,
|
||||
BlockSizeSql, LongBlockSizeSql, LBASectorsSql, LBA48SectorsSql, LogicalAlignmentSql,
|
||||
NominalRotationRateSql, PhysicalBlockSizeSql, UnformattedBPTSql, UnformattedBPSSql, Read6Data,
|
||||
Read10Data, Read12Data, Read16Data, ReadLong10Data, ReadLong16Data, ReadSectorsData,
|
||||
Read10Data, Read12Data, Read16Data, ReadLong10Data, ReadLong16Data, ReadSectorsData,
|
||||
ReadSectorsRetryData, ReadDmaData, ReadDmaRetryData, ReadLbaData, ReadRetryLbaData, ReadDmaLbaData,
|
||||
ReadDmaRetryLbaData, ReadLba48Data, ReadDmaLba48Data, ReadLongData, ReadLongRetryData,
|
||||
ReadLongLbaData, ReadLongRetryLbaData, TocData, FullTocData, AtipData, PmaData, ReadCdData,
|
||||
@@ -1734,7 +1733,7 @@ VolumeLevelsSql FROM MmcFeatures_old WHERE VolumeLevelsSql < 0");
|
||||
PioneerReadCddaData, PioneerReadCddaMsfData, NecReadCddaData, PlextorReadRawDVDData, HLDTSTReadRawDVDData,
|
||||
AtaId, MmcId, ScsiId)
|
||||
SELECT Id, IdentifyData, BlocksSql AS Blocks, BlockSizeSql AS BlockSize, CanReadAACS, CanReadADIP,
|
||||
CanReadATIP, CanReadBCA, CanReadC2Pointers, CanReadCMI, CanReadCorrectedSubchannel,
|
||||
CanReadATIP, CanReadBCA, CanReadC2Pointers, CanReadCMI, CanReadCorrectedSubchannel,
|
||||
CanReadCorrectedSubchannelWithC2, CanReadDCB, CanReadDDS, CanReadDMI, CanReadDiscInformation,
|
||||
CanReadFullTOC, CanReadHDCMI, CanReadLayerCapacity, CanReadFirstTrackPreGap, CanReadLeadIn,
|
||||
CanReadLeadOut, CanReadMediaID, CanReadMediaSerial, CanReadPAC, CanReadPFI, CanReadPMA,
|
||||
@@ -1750,20 +1749,20 @@ VolumeLevelsSql FROM MmcFeatures_old WHERE VolumeLevelsSql < 0");
|
||||
LogicalAlignmentSql AS LogicalAlignment,NominalRotationRateSql AS NominalRotationRate,
|
||||
PhysicalBlockSizeSql AS PhysicalBlockSize, SolidStateDevice, {0} AS UnformattedBPT,
|
||||
UnformattedBPSSql AS UnformattedBPS, SupportsReadDmaLba, SupportsReadDmaRetryLba, SupportsReadLba,
|
||||
SupportsReadRetryLba, SupportsReadLongLba, SupportsReadLongRetryLba, SupportsSeekLba,
|
||||
SupportsReadRetryLba, SupportsReadLongLba, SupportsReadLongRetryLba, SupportsSeekLba,
|
||||
SupportsReadDmaLba48, SupportsReadLba48, SupportsReadDma, SupportsReadDmaRetry, SupportsReadRetry,
|
||||
SupportsReadSectors, SupportsReadLongRetry, SupportsSeek, CanReadingIntersessionLeadIn,
|
||||
SupportsReadSectors, SupportsReadLongRetry, SupportsSeek, CanReadingIntersessionLeadIn,
|
||||
CanReadingIntersessionLeadOut, IntersessionLeadInData, IntersessionLeadOutData, BlocksSql,
|
||||
BlockSizeSql, LongBlockSizeSql, LBASectorsSql, LBA48SectorsSql, LogicalAlignmentSql,
|
||||
NominalRotationRateSql, PhysicalBlockSizeSql, UnformattedBPTSql, UnformattedBPSSql,
|
||||
Read6Data, Read10Data, Read12Data, Read16Data, ReadLong10Data, ReadLong16Data,
|
||||
ReadSectorsData, ReadSectorsRetryData, ReadDmaData, ReadDmaRetryData, ReadLbaData,
|
||||
BlockSizeSql, LongBlockSizeSql, LBASectorsSql, LBA48SectorsSql, LogicalAlignmentSql,
|
||||
NominalRotationRateSql, PhysicalBlockSizeSql, UnformattedBPTSql, UnformattedBPSSql,
|
||||
Read6Data, Read10Data, Read12Data, Read16Data, ReadLong10Data, ReadLong16Data,
|
||||
ReadSectorsData, ReadSectorsRetryData, ReadDmaData, ReadDmaRetryData, ReadLbaData,
|
||||
ReadRetryLbaData, ReadDmaLbaData, ReadDmaRetryLbaData, ReadLba48Data, ReadDmaLba48Data,
|
||||
ReadLongData, ReadLongRetryData, ReadLongLbaData, ReadLongRetryLbaData, TocData, FullTocData,
|
||||
AtipData, PmaData, ReadCdData, ReadCdMsfData, ReadCdFullData, ReadCdMsfFullData, Track1PregapData,
|
||||
LeadInData, LeadOutData, C2PointersData, PQSubchannelData, RWSubchannelData, CorrectedSubchannelData,
|
||||
PQSubchannelWithC2Data, RWSubchannelWithC2Data, CorrectedSubchannelWithC2Data, PfiData, DmiData,
|
||||
CmiData, DvdBcaData, DvdAacsData, DvdDdsData, DvdSaiData, PriData, EmbossedPfiData,
|
||||
CmiData, DvdBcaData, DvdAacsData, DvdDdsData, DvdSaiData, PriData, EmbossedPfiData,
|
||||
AdipData, DcbData, HdCmiData, DvdLayerData, BluBcaData, BluDdsData, BluSaiData, BluDiData,
|
||||
BluPacData, PlextorReadCddaData, PioneerReadCddaData, PioneerReadCddaMsfData, NecReadCddaData,
|
||||
PlextorReadRawDVDData, HLDTSTReadRawDVDData, Ata_Id, Mmc_Id, Scsi_Id
|
||||
@@ -1,14 +1,13 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Aaru.Server.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
namespace Aaru.Server.Migrations
|
||||
namespace Aaru.Server.Database.Migrations
|
||||
{
|
||||
[DbContext(typeof(AaruServerContext))]
|
||||
[DbContext(typeof(DbContext))]
|
||||
[Migration("20191102231633_MakeFieldsUnsigned")]
|
||||
partial class MakeFieldsUnsigned
|
||||
{
|
||||
@@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Aaru.Server.Migrations
|
||||
namespace Aaru.Server.Database.Migrations
|
||||
{
|
||||
public partial class MakeFieldsUnsigned : Migration
|
||||
{
|
||||
@@ -1,14 +1,13 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Aaru.Server.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
namespace Aaru.Server.Migrations
|
||||
namespace Aaru.Server.Database.Migrations
|
||||
{
|
||||
[DbContext(typeof(AaruServerContext))]
|
||||
[DbContext(typeof(DbContext))]
|
||||
[Migration("20191106230730_CreateIdentitySchema")]
|
||||
partial class CreateIdentitySchema
|
||||
{
|
||||
@@ -2,7 +2,7 @@
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Aaru.Server.Migrations
|
||||
namespace Aaru.Server.Database.Migrations
|
||||
{
|
||||
public partial class CreateIdentitySchema : Migration
|
||||
{
|
||||
@@ -1,14 +1,13 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Aaru.Server.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
namespace Aaru.Server.Migrations
|
||||
namespace Aaru.Server.Database.Migrations
|
||||
{
|
||||
[DbContext(typeof(AaruServerContext))]
|
||||
[DbContext(typeof(DbContext))]
|
||||
[Migration("20191108004756_SetAllOnDeleteSetNull")]
|
||||
partial class SetAllOnDeleteSetNull
|
||||
{
|
||||
@@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Aaru.Server.Migrations
|
||||
namespace Aaru.Server.Database.Migrations
|
||||
{
|
||||
public partial class SetAllOnDeleteSetNull : Migration
|
||||
{
|
||||
@@ -1,14 +1,13 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Aaru.Server.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
namespace Aaru.Server.Migrations
|
||||
namespace Aaru.Server.Database.Migrations
|
||||
{
|
||||
[DbContext(typeof(AaruServerContext))]
|
||||
[DbContext(typeof(DbContext))]
|
||||
[Migration("20191110143605_CascadeDeleteDensityCodes")]
|
||||
partial class CascadeDeleteDensityCodes
|
||||
{
|
||||
@@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Aaru.Server.Migrations
|
||||
namespace Aaru.Server.Database.Migrations
|
||||
{
|
||||
public partial class CascadeDeleteDensityCodes : Migration
|
||||
{
|
||||
@@ -1,14 +1,13 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Aaru.Server.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
namespace Aaru.Server.Migrations
|
||||
namespace Aaru.Server.Database.Migrations
|
||||
{
|
||||
[DbContext(typeof(AaruServerContext))]
|
||||
[DbContext(typeof(DbContext))]
|
||||
[Migration("20191110144834_CascadeDeleteBlockDescriptors")]
|
||||
partial class CascadeDeleteBlockDescriptors
|
||||
{
|
||||
@@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Aaru.Server.Migrations
|
||||
namespace Aaru.Server.Database.Migrations
|
||||
{
|
||||
public partial class CascadeDeleteBlockDescriptors : Migration
|
||||
{
|
||||
@@ -1,14 +1,13 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Aaru.Server.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
namespace Aaru.Server.Migrations
|
||||
namespace Aaru.Server.Database.Migrations
|
||||
{
|
||||
[DbContext(typeof(AaruServerContext))]
|
||||
[DbContext(typeof(DbContext))]
|
||||
[Migration("20191113003156_CascadeDeleteMmcFeatures")]
|
||||
partial class CascadeDeleteMmcFeatures
|
||||
{
|
||||
@@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Aaru.Server.Migrations
|
||||
namespace Aaru.Server.Database.Migrations
|
||||
{
|
||||
public partial class CascadeDeleteMmcFeatures : Migration
|
||||
{
|
||||
@@ -1,14 +1,13 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Aaru.Server.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
namespace Aaru.Server.Migrations
|
||||
namespace Aaru.Server.Database.Migrations
|
||||
{
|
||||
[DbContext(typeof(AaruServerContext))]
|
||||
[DbContext(typeof(DbContext))]
|
||||
[Migration("20191117215158_CascadeDeleteSupportedDensities")]
|
||||
partial class CascadeDeleteSupportedDensities
|
||||
{
|
||||
@@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Aaru.Server.Migrations
|
||||
namespace Aaru.Server.Database.Migrations
|
||||
{
|
||||
public partial class CascadeDeleteSupportedDensities : Migration
|
||||
{
|
||||
@@ -1,14 +1,13 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Aaru.Server.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
namespace Aaru.Server.Migrations
|
||||
namespace Aaru.Server.Database.Migrations
|
||||
{
|
||||
[DbContext(typeof(AaruServerContext))]
|
||||
[DbContext(typeof(DbContext))]
|
||||
[Migration("20191124212117_EFTypesUpdate")]
|
||||
partial class EFTypesUpdate
|
||||
{
|
||||
@@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Aaru.Server.Migrations
|
||||
namespace Aaru.Server.Database.Migrations
|
||||
{
|
||||
public partial class EFTypesUpdate : Migration
|
||||
{
|
||||
@@ -1,14 +1,13 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Aaru.Server.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
namespace Aaru.Server.Migrations
|
||||
namespace Aaru.Server.Database.Migrations
|
||||
{
|
||||
[DbContext(typeof(AaruServerContext))]
|
||||
[DbContext(typeof(DbContext))]
|
||||
[Migration("20191124220655_AddSupportsScrambledReadCd")]
|
||||
partial class AddSupportsScrambledReadCd
|
||||
{
|
||||
@@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Aaru.Server.Migrations
|
||||
namespace Aaru.Server.Database.Migrations
|
||||
{
|
||||
public partial class AddSupportsScrambledReadCd : Migration
|
||||
{
|
||||
@@ -1,14 +1,13 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Aaru.Server.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
namespace Aaru.Server.Migrations
|
||||
namespace Aaru.Server.Database.Migrations
|
||||
{
|
||||
[DbContext(typeof(AaruServerContext))]
|
||||
[DbContext(typeof(DbContext))]
|
||||
[Migration("20191203212552_NameCountModel")]
|
||||
partial class NameCountModel
|
||||
{
|
||||
@@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Aaru.Server.Migrations
|
||||
namespace Aaru.Server.Database.Migrations
|
||||
{
|
||||
public partial class NameCountModel : Migration
|
||||
{
|
||||
@@ -1,14 +1,13 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Aaru.Server.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
namespace Aaru.Server.Migrations
|
||||
namespace Aaru.Server.Database.Migrations
|
||||
{
|
||||
[DbContext(typeof(AaruServerContext))]
|
||||
[DbContext(typeof(DbContext))]
|
||||
[Migration("20191204182314_RemoteStatistics")]
|
||||
partial class RemoteStatistics
|
||||
{
|
||||
@@ -1,7 +1,7 @@
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Aaru.Server.Migrations
|
||||
namespace Aaru.Server.Database.Migrations
|
||||
{
|
||||
public partial class RemoteStatistics : Migration
|
||||
{
|
||||
@@ -1,14 +1,13 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Aaru.Server.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
namespace Aaru.Server.Migrations
|
||||
namespace Aaru.Server.Database.Migrations
|
||||
{
|
||||
[DbContext(typeof(AaruServerContext))]
|
||||
[DbContext(typeof(DbContext))]
|
||||
[Migration("20200710172932_AddGdRomSwapDiscCapabilities")]
|
||||
partial class AddGdRomSwapDiscCapabilities
|
||||
{
|
||||
@@ -1,7 +1,7 @@
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Aaru.Server.Migrations
|
||||
namespace Aaru.Server.Database.Migrations
|
||||
{
|
||||
public partial class AddGdRomSwapDiscCapabilities : Migration
|
||||
{
|
||||
@@ -1,14 +1,13 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Aaru.Server.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
namespace Aaru.Server.Migrations
|
||||
namespace Aaru.Server.Database.Migrations
|
||||
{
|
||||
[DbContext(typeof(AaruServerContext))]
|
||||
[DbContext(typeof(DbContext))]
|
||||
[Migration("20200710184810_AddCanReadGdRomUsingSwapDisc")]
|
||||
partial class AddCanReadGdRomUsingSwapDisc
|
||||
{
|
||||
@@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Aaru.Server.Migrations
|
||||
namespace Aaru.Server.Database.Migrations
|
||||
{
|
||||
public partial class AddCanReadGdRomUsingSwapDisc : Migration
|
||||
{
|
||||
@@ -1,14 +1,13 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Aaru.Server.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
namespace Aaru.Server.Migrations
|
||||
namespace Aaru.Server.Database.Migrations
|
||||
{
|
||||
[DbContext(typeof(AaruServerContext))]
|
||||
[DbContext(typeof(DbContext))]
|
||||
[Migration("20200710200444_AddAudioFieldsToGdromReadCapabilities")]
|
||||
partial class AddAudioFieldsToGdromReadCapabilities
|
||||
{
|
||||
@@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Aaru.Server.Migrations
|
||||
namespace Aaru.Server.Database.Migrations
|
||||
{
|
||||
public partial class AddAudioFieldsToGdromReadCapabilities : Migration
|
||||
{
|
||||
@@ -1,14 +1,13 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Aaru.Server.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
namespace Aaru.Server.Migrations
|
||||
namespace Aaru.Server.Database.Migrations
|
||||
{
|
||||
[DbContext(typeof(AaruServerContext))]
|
||||
[DbContext(typeof(DbContext))]
|
||||
[Migration("20200711180338_AddFieldsForF1hCommand06hSubcommand")]
|
||||
partial class AddFieldsForF1hCommand06hSubcommand
|
||||
{
|
||||
@@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Aaru.Server.Migrations
|
||||
namespace Aaru.Server.Database.Migrations
|
||||
{
|
||||
public partial class AddFieldsForF1hCommand06hSubcommand : Migration
|
||||
{
|
||||
@@ -1,14 +1,13 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Aaru.Server.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
namespace Aaru.Server.Migrations
|
||||
namespace Aaru.Server.Database.Migrations
|
||||
{
|
||||
[DbContext(typeof(AaruServerContext))]
|
||||
[DbContext(typeof(DbContext))]
|
||||
[Migration("20200711231045_FixGdRomCapabilitiesFieldName")]
|
||||
partial class FixGdRomCapabilitiesFieldName
|
||||
{
|
||||
@@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace Aaru.Server.Migrations
|
||||
namespace Aaru.Server.Database.Migrations
|
||||
{
|
||||
public partial class FixGdRomCapabilitiesFieldName : Migration
|
||||
{
|
||||
@@ -1,6 +1,5 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Aaru.Server.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
@@ -8,9 +7,9 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Aaru.Server.Migrations
|
||||
namespace Aaru.Server.Database.Migrations
|
||||
{
|
||||
[DbContext(typeof(AaruServerContext))]
|
||||
[DbContext(typeof(DbContext))]
|
||||
[Migration("20211208215447_AddNesHeaders")]
|
||||
partial class AddNesHeaders
|
||||
{
|
||||
@@ -4,7 +4,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Aaru.Server.Migrations
|
||||
namespace Aaru.Server.Database.Migrations
|
||||
{
|
||||
public partial class AddNesHeaders : Migration
|
||||
{
|
||||
@@ -1,15 +1,14 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Aaru.Server.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Aaru.Server.Migrations
|
||||
namespace Aaru.Server.Database.Migrations
|
||||
{
|
||||
[DbContext(typeof(AaruServerContext))]
|
||||
[DbContext(typeof(DbContext))]
|
||||
partial class AaruServerContextModelSnapshot : ModelSnapshot
|
||||
{
|
||||
protected override void BuildModel(ModelBuilder modelBuilder)
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Aaru.Server.Models;
|
||||
namespace Aaru.Server.Database.Models;
|
||||
|
||||
public abstract class BaseModel<T>
|
||||
{
|
||||
@@ -30,7 +30,7 @@
|
||||
// Copyright © 2011-2024 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Server.Models;
|
||||
namespace Aaru.Server.Database.Models;
|
||||
|
||||
public abstract class BaseOperatingSystem : BaseModel<int>
|
||||
{
|
||||
@@ -33,7 +33,7 @@
|
||||
using System.ComponentModel;
|
||||
using Aaru.CommonTypes.Metadata;
|
||||
|
||||
namespace Aaru.Server.Models;
|
||||
namespace Aaru.Server.Database.Models;
|
||||
|
||||
public class CompactDiscOffset : CdOffset
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Aaru.Server.Models;
|
||||
namespace Aaru.Server.Database.Models;
|
||||
|
||||
public class ChsModel
|
||||
{
|
||||
@@ -30,6 +30,6 @@
|
||||
// Copyright © 2011-2024 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Server.Models;
|
||||
namespace Aaru.Server.Database.Models;
|
||||
|
||||
public class Command : NameCountModel<int> {}
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Aaru.Server.Models;
|
||||
namespace Aaru.Server.Database.Models;
|
||||
|
||||
public class CompareModel
|
||||
{
|
||||
@@ -34,7 +34,7 @@ using System.ComponentModel;
|
||||
using Aaru.CommonTypes.Enums;
|
||||
using Aaru.CommonTypes.Metadata;
|
||||
|
||||
namespace Aaru.Server.Models;
|
||||
namespace Aaru.Server.Database.Models;
|
||||
|
||||
public class Device : DeviceReportV2
|
||||
{
|
||||
@@ -1,6 +1,6 @@
|
||||
using Aaru.CommonTypes.Metadata;
|
||||
|
||||
namespace Aaru.Server.Models;
|
||||
namespace Aaru.Server.Database.Models;
|
||||
|
||||
public class DeviceDetails
|
||||
{
|
||||
@@ -30,7 +30,7 @@
|
||||
// Copyright © 2011-2024 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Server.Models;
|
||||
namespace Aaru.Server.Database.Models;
|
||||
|
||||
public class DeviceItem
|
||||
{
|
||||
@@ -30,7 +30,7 @@
|
||||
// Copyright © 2011-2024 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Server.Models;
|
||||
namespace Aaru.Server.Database.Models;
|
||||
|
||||
public class DeviceStat : BaseModel<int>
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Aaru.Server.Models;
|
||||
namespace Aaru.Server.Database.Models;
|
||||
|
||||
public class ErrorViewModel
|
||||
{
|
||||
@@ -30,6 +30,6 @@
|
||||
// Copyright © 2011-2024 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Server.Models;
|
||||
namespace Aaru.Server.Database.Models;
|
||||
|
||||
public class Filesystem : NameCountModel<int> {}
|
||||
@@ -30,6 +30,6 @@
|
||||
// Copyright © 2011-2024 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Server.Models;
|
||||
namespace Aaru.Server.Database.Models;
|
||||
|
||||
public class Filter : NameCountModel<int> {}
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Aaru.Server.Models;
|
||||
namespace Aaru.Server.Database.Models;
|
||||
|
||||
public class FindReportModel : BaseModel<int>
|
||||
{
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Aaru.Server.Models;
|
||||
namespace Aaru.Server.Database.Models;
|
||||
|
||||
public class FireWireModel
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Aaru.Server.Models;
|
||||
namespace Aaru.Server.Database.Models;
|
||||
|
||||
public class IdHashModel : BaseModel<int>
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Aaru.Server.Models;
|
||||
namespace Aaru.Server.Database.Models;
|
||||
|
||||
public class IdHashModelForView
|
||||
{
|
||||
@@ -34,7 +34,7 @@ using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Aaru.CommonTypes;
|
||||
|
||||
namespace Aaru.Server.Models;
|
||||
namespace Aaru.Server.Database.Models;
|
||||
|
||||
public class Media : BaseModel<int>
|
||||
{
|
||||
@@ -30,6 +30,6 @@
|
||||
// Copyright © 2011-2024 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Server.Models;
|
||||
namespace Aaru.Server.Database.Models;
|
||||
|
||||
public class MediaFormat : NameCountModel<int> {}
|
||||
@@ -30,7 +30,7 @@
|
||||
// Copyright © 2011-2024 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Server.Models;
|
||||
namespace Aaru.Server.Database.Models;
|
||||
|
||||
public class MediaItem
|
||||
{
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Aaru.Server.Models;
|
||||
namespace Aaru.Server.Database.Models;
|
||||
|
||||
public class MmcModelForView : BaseModel<int>
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Aaru.Server.Models;
|
||||
namespace Aaru.Server.Database.Models;
|
||||
|
||||
public abstract class NameCountModel<T> : BaseModel<T>
|
||||
{
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Aaru.CommonTypes.Enums;
|
||||
|
||||
namespace Aaru.Server.Models;
|
||||
namespace Aaru.Server.Database.Models;
|
||||
|
||||
public class NesHeaderInfo : BaseModel<int>
|
||||
{
|
||||
@@ -30,6 +30,6 @@
|
||||
// Copyright © 2011-2024 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Server.Models;
|
||||
namespace Aaru.Server.Database.Models;
|
||||
|
||||
public class OperatingSystem : BaseOperatingSystem {}
|
||||
@@ -30,6 +30,6 @@
|
||||
// Copyright © 2011-2024 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Server.Models;
|
||||
namespace Aaru.Server.Database.Models;
|
||||
|
||||
public class Partition : NameCountModel<int> {}
|
||||
@@ -30,6 +30,6 @@
|
||||
// Copyright © 2011-2024 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Server.Models;
|
||||
namespace Aaru.Server.Database.Models;
|
||||
|
||||
public class RemoteApplication : BaseOperatingSystem {}
|
||||
@@ -30,6 +30,6 @@
|
||||
// Copyright © 2011-2024 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Server.Models;
|
||||
namespace Aaru.Server.Database.Models;
|
||||
|
||||
public class RemoteArchitecture : NameCountModel<int> {}
|
||||
@@ -30,6 +30,6 @@
|
||||
// Copyright © 2011-2024 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Server.Models;
|
||||
namespace Aaru.Server.Database.Models;
|
||||
|
||||
public class RemoteOperatingSystem : BaseOperatingSystem {}
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Aaru.Server.Models;
|
||||
namespace Aaru.Server.Database.Models;
|
||||
|
||||
public class SscModel
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Aaru.Server.Models;
|
||||
namespace Aaru.Server.Database.Models;
|
||||
|
||||
public class TestedMediaDataModel
|
||||
{
|
||||
@@ -33,7 +33,7 @@
|
||||
using System.ComponentModel;
|
||||
using Aaru.CommonTypes.Metadata;
|
||||
|
||||
namespace Aaru.Server.Models;
|
||||
namespace Aaru.Server.Database.Models;
|
||||
|
||||
public class UploadedReport : DeviceReportV2
|
||||
{
|
||||
@@ -1,6 +1,6 @@
|
||||
using Aaru.CommonTypes.Metadata;
|
||||
|
||||
namespace Aaru.Server.Models;
|
||||
namespace Aaru.Server.Database.Models;
|
||||
|
||||
public class UploadedReportDetails
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Aaru.Server.Models;
|
||||
namespace Aaru.Server.Database.Models;
|
||||
|
||||
public class UsbModel
|
||||
{
|
||||
@@ -30,9 +30,9 @@
|
||||
// Copyright © 2011-2024 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Aaru.Server.Models;
|
||||
namespace Aaru.Server.Database.Models;
|
||||
|
||||
public class UsbProduct : BaseModel<int>
|
||||
{
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Aaru.Server.Models;
|
||||
namespace Aaru.Server.Database.Models;
|
||||
|
||||
public class UsbProductModel
|
||||
{
|
||||
@@ -32,9 +32,9 @@
|
||||
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Newtonsoft.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Aaru.Server.Models;
|
||||
namespace Aaru.Server.Database.Models;
|
||||
|
||||
public class UsbVendor : BaseModel<int>
|
||||
{
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Aaru.Server.Models;
|
||||
namespace Aaru.Server.Database.Models;
|
||||
|
||||
public class UsbVendorModel
|
||||
{
|
||||
@@ -30,6 +30,6 @@
|
||||
// Copyright © 2011-2024 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
namespace Aaru.Server.Models;
|
||||
namespace Aaru.Server.Database.Models;
|
||||
|
||||
public class Version : NameCountModel<int> {}
|
||||
@@ -38,9 +38,10 @@ using System.Net;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text.Json;
|
||||
using Aaru.CommonTypes.Enums;
|
||||
using Aaru.Server.Models;
|
||||
using Aaru.Server.Database.Models;
|
||||
using HtmlAgilityPack;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using DbContext = Aaru.Server.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Task;
|
||||
|
||||
@@ -53,7 +54,7 @@ class Program
|
||||
|
||||
start = DateTime.UtcNow;
|
||||
System.Console.WriteLine("{0}: Connecting to database...", DateTime.UtcNow);
|
||||
var ctx = new AaruServerContext();
|
||||
var ctx = new DbContext();
|
||||
end = DateTime.UtcNow;
|
||||
System.Console.WriteLine("{0}: Took {1:F2} seconds", end, (end - start).TotalSeconds);
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aaru.Server.Api", "Aaru.Ser
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aaru.Server.New", "Aaru.Server.New\Aaru.Server.New.csproj", "{032D24BA-EC3B-4BD1-ADD6-9463E2DC5D7E}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aaru.Server.Database", "Aaru.Server.Database\Aaru.Server.Database.csproj", "{FA830C89-B3C4-4139-B756-B6C0F35C0BB4}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -44,6 +46,10 @@ Global
|
||||
{032D24BA-EC3B-4BD1-ADD6-9463E2DC5D7E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{032D24BA-EC3B-4BD1-ADD6-9463E2DC5D7E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{032D24BA-EC3B-4BD1-ADD6-9463E2DC5D7E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{FA830C89-B3C4-4139-B756-B6C0F35C0BB4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{FA830C89-B3C4-4139-B756-B6C0F35C0BB4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{FA830C89-B3C4-4139-B756-B6C0F35C0BB4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FA830C89-B3C4-4139-B756-B6C0F35C0BB4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -32,15 +32,9 @@
|
||||
<PackageReference Include="MailKit" Version="2.15.0"/>
|
||||
<PackageReference Include="Markdig" Version="0.26.0"/>
|
||||
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.19.0"/>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.0"/>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="6.0.0"/>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.0"/>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="6.0.0"/>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.0"/>
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.0"/>
|
||||
<PackageReference Include="MimeKit" Version="2.15.1"/>
|
||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="6.0.0"/>
|
||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql.Design" Version="1.1.2"/>
|
||||
<PackageReference Include="prometheus-net.AspNetCore" Version="5.0.2"/>
|
||||
<PackageReference Include="Unclassified.NetRevisionTask" Version="0.4.2" PrivateAssets="all"/>
|
||||
<PackageReference Include="AsyncFixer" Version="1.6.0">
|
||||
@@ -184,4 +178,8 @@
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Aaru.Server.Database\Aaru.Server.Database.csproj"/>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
using System.Reflection;
|
||||
using Aaru.CommonTypes.Structs.Devices.ATA;
|
||||
using Aaru.Server.Core;
|
||||
using Aaru.Server.Database.Models;
|
||||
using Newtonsoft.Json;
|
||||
using Ata = Aaru.CommonTypes.Metadata.Ata;
|
||||
using DbContext = Aaru.Server.Database.DbContext;
|
||||
using TestedMedia = Aaru.CommonTypes.Metadata.TestedMedia;
|
||||
|
||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||
@@ -11,9 +13,9 @@ namespace Aaru.Server.Areas.Admin.Controllers;
|
||||
[Authorize]
|
||||
public sealed class AtasController : Controller
|
||||
{
|
||||
readonly AaruServerContext _context;
|
||||
readonly DbContext _context;
|
||||
|
||||
public AtasController(AaruServerContext context) => _context = context;
|
||||
public AtasController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/Atas
|
||||
public IActionResult Index() => View(_context.Ata.AsEnumerable()
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
using DbContext = Aaru.Server.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class BlockDescriptorsController : Controller
|
||||
{
|
||||
readonly AaruServerContext _context;
|
||||
readonly DbContext _context;
|
||||
|
||||
public BlockDescriptorsController(AaruServerContext context) => _context = context;
|
||||
public BlockDescriptorsController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/BlockDescriptors
|
||||
public async Task<IActionResult> Index() => View(await _context.BlockDescriptor.OrderBy(b => b.BlockLength)
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using Aaru.CommonTypes.Metadata;
|
||||
using Aaru.Server.Database.Models;
|
||||
using Newtonsoft.Json;
|
||||
using DbContext = Aaru.Server.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||
|
||||
@@ -7,9 +9,9 @@ namespace Aaru.Server.Areas.Admin.Controllers;
|
||||
[Authorize]
|
||||
public sealed class ChsController : Controller
|
||||
{
|
||||
readonly AaruServerContext _context;
|
||||
readonly DbContext _context;
|
||||
|
||||
public ChsController(AaruServerContext context) => _context = context;
|
||||
public ChsController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/Chs
|
||||
public async Task<IActionResult> Index() => View(await _context.Chs.OrderBy(c => c.Cylinders)
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
using DbContext = Aaru.Server.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class CommandsController : Controller
|
||||
{
|
||||
readonly AaruServerContext _context;
|
||||
readonly DbContext _context;
|
||||
|
||||
public CommandsController(AaruServerContext context) => _context = context;
|
||||
public CommandsController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/Commands
|
||||
public async Task<IActionResult> Index() => View(await _context.Commands.OrderBy(c => c.Name).ToListAsync());
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
using Aaru.Server.Database.Models;
|
||||
using DbContext = Aaru.Server.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class CompactDiscOffsetsController : Controller
|
||||
{
|
||||
readonly AaruServerContext _context;
|
||||
readonly DbContext _context;
|
||||
|
||||
public CompactDiscOffsetsController(AaruServerContext context) => _context = context;
|
||||
public CompactDiscOffsetsController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/CompactDiscOffsets
|
||||
public async Task<IActionResult> Index() => View(await _context.CdOffsets.OrderBy(o => o.Manufacturer)
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
using Aaru.Server.Database.Models;
|
||||
using DbContext = Aaru.Server.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class DeviceStatsController : Controller
|
||||
{
|
||||
readonly AaruServerContext _context;
|
||||
readonly DbContext _context;
|
||||
|
||||
public DeviceStatsController(AaruServerContext context) => _context = context;
|
||||
public DeviceStatsController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/DeviceStats
|
||||
public async Task<IActionResult> Index() => View(await _context.DeviceStats.OrderBy(d => d.Manufacturer)
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using Aaru.CommonTypes.Metadata;
|
||||
using Aaru.Server.Database.Models;
|
||||
using DbContext = Aaru.Server.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||
|
||||
@@ -6,9 +8,9 @@ namespace Aaru.Server.Areas.Admin.Controllers;
|
||||
[Authorize]
|
||||
public sealed class DevicesController : Controller
|
||||
{
|
||||
readonly AaruServerContext _context;
|
||||
readonly DbContext _context;
|
||||
|
||||
public DevicesController(AaruServerContext context) => _context = context;
|
||||
public DevicesController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/Devices
|
||||
public async Task<IActionResult> Index() => View(await _context.Devices.OrderBy(d => d.Manufacturer)
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
using DbContext = Aaru.Server.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class FilesystemsController : Controller
|
||||
{
|
||||
readonly AaruServerContext _context;
|
||||
readonly DbContext _context;
|
||||
|
||||
public FilesystemsController(AaruServerContext context) => _context = context;
|
||||
public FilesystemsController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/Filesystems
|
||||
public async Task<IActionResult> Index() => View(await _context.Filesystems.OrderBy(f => f.Name).ToListAsync());
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
using DbContext = Aaru.Server.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class FiltersController : Controller
|
||||
{
|
||||
readonly AaruServerContext _context;
|
||||
readonly DbContext _context;
|
||||
|
||||
public FiltersController(AaruServerContext context) => _context = context;
|
||||
public FiltersController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/Filters
|
||||
public async Task<IActionResult> Index() => View(await _context.Filters.OrderBy(f => f.Name).ToListAsync());
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using Aaru.CommonTypes.Metadata;
|
||||
using Aaru.Server.Database.Models;
|
||||
using Newtonsoft.Json;
|
||||
using DbContext = Aaru.Server.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||
|
||||
@@ -7,9 +9,9 @@ namespace Aaru.Server.Areas.Admin.Controllers;
|
||||
[Authorize]
|
||||
public sealed class FireWiresController : Controller
|
||||
{
|
||||
readonly AaruServerContext _context;
|
||||
readonly DbContext _context;
|
||||
|
||||
public FireWiresController(AaruServerContext context) => _context = context;
|
||||
public FireWiresController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/FireWires
|
||||
public async Task<IActionResult> Index() =>
|
||||
|
||||
@@ -3,6 +3,8 @@ using System.Web;
|
||||
using Aaru.CommonTypes.Metadata;
|
||||
using Aaru.Decoders.CD;
|
||||
using Aaru.Helpers;
|
||||
using Aaru.Server.Database.Models;
|
||||
using DbContext = Aaru.Server.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||
|
||||
@@ -10,9 +12,9 @@ namespace Aaru.Server.Areas.Admin.Controllers;
|
||||
[Authorize]
|
||||
public sealed class GdRomSwapDiscCapabilitiesController : Controller
|
||||
{
|
||||
readonly AaruServerContext _context;
|
||||
readonly DbContext _context;
|
||||
|
||||
public GdRomSwapDiscCapabilitiesController(AaruServerContext context) => _context = context;
|
||||
public GdRomSwapDiscCapabilitiesController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/GdRomSwapDiscCapabilities/Details/5
|
||||
public async Task<IActionResult> Details(int? id)
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
using Aaru.Server.Database.Models;
|
||||
using DbContext = Aaru.Server.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class MediaFormatsController : Controller
|
||||
{
|
||||
readonly AaruServerContext _context;
|
||||
readonly DbContext _context;
|
||||
|
||||
public MediaFormatsController(AaruServerContext context) => _context = context;
|
||||
public MediaFormatsController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/MediaFormats
|
||||
public async Task<IActionResult> Index() => View(await _context.MediaFormats.OrderBy(mf => mf.Name).ToListAsync());
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
using Aaru.Server.Database.Models;
|
||||
using DbContext = Aaru.Server.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class MediasController : Controller
|
||||
{
|
||||
readonly AaruServerContext _context;
|
||||
readonly DbContext _context;
|
||||
|
||||
public MediasController(AaruServerContext context) => _context = context;
|
||||
public MediasController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/Medias
|
||||
public IActionResult Index(bool? real)
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using Aaru.CommonTypes.Metadata;
|
||||
using Aaru.Server.Database.Models;
|
||||
using DbContext = Aaru.Server.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||
|
||||
@@ -6,9 +8,9 @@ namespace Aaru.Server.Areas.Admin.Controllers;
|
||||
[Authorize]
|
||||
public sealed class MmcController : Controller
|
||||
{
|
||||
readonly AaruServerContext _context;
|
||||
readonly DbContext _context;
|
||||
|
||||
public MmcController(AaruServerContext context) => _context = context;
|
||||
public MmcController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/Mmc
|
||||
public IActionResult Index() => View(_context.Mmc.Where(m => m.ModeSense2AData != null)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Aaru.CommonTypes.Metadata;
|
||||
using DbContext = Aaru.Server.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||
|
||||
@@ -6,9 +7,9 @@ namespace Aaru.Server.Areas.Admin.Controllers;
|
||||
[Authorize]
|
||||
public sealed class MmcFeaturesController : Controller
|
||||
{
|
||||
readonly AaruServerContext _context;
|
||||
readonly DbContext _context;
|
||||
|
||||
public MmcFeaturesController(AaruServerContext context) => _context = context;
|
||||
public MmcFeaturesController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/MmcFeatures
|
||||
public async Task<IActionResult> Index() => View(await _context.MmcFeatures.ToListAsync());
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Aaru.CommonTypes.Metadata;
|
||||
using DbContext = Aaru.Server.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||
|
||||
@@ -6,9 +7,9 @@ namespace Aaru.Server.Areas.Admin.Controllers;
|
||||
[Authorize]
|
||||
public sealed class MmcSdsController : Controller
|
||||
{
|
||||
readonly AaruServerContext _context;
|
||||
readonly DbContext _context;
|
||||
|
||||
public MmcSdsController(AaruServerContext context) => _context = context;
|
||||
public MmcSdsController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/MmcSds
|
||||
public async Task<IActionResult> Index() => View(await _context.MmcSd.ToListAsync());
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
using DbContext = Aaru.Server.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class OperatingSystemsController : Controller
|
||||
{
|
||||
readonly AaruServerContext _context;
|
||||
readonly DbContext _context;
|
||||
|
||||
public OperatingSystemsController(AaruServerContext context) => _context = context;
|
||||
public OperatingSystemsController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/OperatingSystems
|
||||
public async Task<IActionResult> Index() =>
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
using DbContext = Aaru.Server.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
public sealed class PartitionsController : Controller
|
||||
{
|
||||
readonly AaruServerContext _context;
|
||||
readonly DbContext _context;
|
||||
|
||||
public PartitionsController(AaruServerContext context) => _context = context;
|
||||
public PartitionsController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/Partitions
|
||||
public async Task<IActionResult> Index() => View(await _context.Partitions.OrderBy(p => p.Name).ToListAsync());
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Aaru.CommonTypes.Metadata;
|
||||
using DbContext = Aaru.Server.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||
|
||||
@@ -6,9 +7,9 @@ namespace Aaru.Server.Areas.Admin.Controllers;
|
||||
[Authorize]
|
||||
public sealed class PcmciasController : Controller
|
||||
{
|
||||
readonly AaruServerContext _context;
|
||||
readonly DbContext _context;
|
||||
|
||||
public PcmciasController(AaruServerContext context) => _context = context;
|
||||
public PcmciasController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/Pcmcias
|
||||
public async Task<IActionResult> Index() => View(await _context.Pcmcia.ToListAsync());
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using Aaru.CommonTypes.Metadata;
|
||||
using Aaru.Server.Database.Models;
|
||||
using Microsoft.EntityFrameworkCore.ChangeTracking;
|
||||
using DbContext = Aaru.Server.Database.DbContext;
|
||||
|
||||
namespace Aaru.Server.Areas.Admin.Controllers;
|
||||
|
||||
@@ -7,9 +9,9 @@ namespace Aaru.Server.Areas.Admin.Controllers;
|
||||
[Authorize]
|
||||
public sealed class ReportsController : Controller
|
||||
{
|
||||
readonly AaruServerContext _context;
|
||||
readonly DbContext _context;
|
||||
|
||||
public ReportsController(AaruServerContext context) => _context = context;
|
||||
public ReportsController(DbContext context) => _context = context;
|
||||
|
||||
// GET: Admin/Reports
|
||||
public async Task<IActionResult> Index() => View(await _context.Reports.OrderBy(r => r.Manufacturer)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user