Split LeafOutputFile content into different table for performance
This commit is contained in:
@@ -62,7 +62,13 @@ namespace LeafWeb.Core.DAL
|
||||
public void DeleteLeafInput(LeafInput leafInput)
|
||||
{
|
||||
RemoveCollectionFromDbSet(leafInput.InputFiles, _db.LeafInputFiles);
|
||||
|
||||
if (leafInput.OutputFiles != null)
|
||||
foreach (var outputFile in leafInput.OutputFiles.ToArray())
|
||||
if (outputFile.FileContents != null)
|
||||
_db.LeafOutputFileContents.Remove(outputFile.FileContents);
|
||||
RemoveCollectionFromDbSet(leafInput.OutputFiles, _db.LeafOutputFiles);
|
||||
|
||||
RemoveCollectionFromDbSet(leafInput.StatusHistory, _db.LeafInputStatus);
|
||||
// Data
|
||||
if (leafInput.LeafInputData != null)
|
||||
|
||||
@@ -14,6 +14,7 @@ namespace LeafWeb.Core.DAL
|
||||
public DbSet<FluxnetSite> FluxnetSites { get; set; }
|
||||
public DbSet<PhotosynthesisType> PhotosynthesisTypes { get; set; }
|
||||
public DbSet<LeafOutputFile> LeafOutputFiles { get; set; }
|
||||
public DbSet<LeafOutputFileContents> LeafOutputFileContents { get; set; }
|
||||
public DbSet<LeafInputData> LeafInputData { get; set; }
|
||||
public DbSet<LeafInputDataCurve> LeafInputDataCurves { get; set; }
|
||||
public DbSet<LeafInputDataPhotosynthetic> LeafInputDataPhotosynthetic { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user