diff --git a/src/IPA.Bcfier.App/Controllers/ProjectsController.cs b/src/IPA.Bcfier.App/Controllers/ProjectsController.cs index 5e12281..cd5a4c6 100644 --- a/src/IPA.Bcfier.App/Controllers/ProjectsController.cs +++ b/src/IPA.Bcfier.App/Controllers/ProjectsController.cs @@ -114,6 +114,12 @@ public async Task DeleteProjectAsync(Guid projectId) } _context.Projects.Remove(dbProject); + + var lastOpenedFiles = await _context.LastOpenedUserFiles + .Where(f => f.ProjectId == projectId) + .ToListAsync(); + _context.LastOpenedUserFiles.RemoveRange(lastOpenedFiles); + await _context.SaveChangesAsync(); return NoContent(); }