actually start to bring structure into the project

make it resilent against restarts/reloads
remove all user interaction for resource gathering
compute hashes on first time file resolving and on updates of said file on resolving
This commit is contained in:
Stanley Dimant
2022-06-14 21:53:41 +02:00
parent c0de781421
commit da2b2701e8
12 changed files with 379 additions and 232 deletions

View File

@@ -10,5 +10,6 @@ namespace MareSynchronos.FileCacheDB
public string Hash { get; set; }
public string Filepath { get; set; }
public string LastModifiedDate { get; set; }
public int Version { get; set; }
}
}

View File

@@ -37,6 +37,8 @@ namespace MareSynchronos.FileCacheDB
entity.HasKey(e => new { e.Hash, e.Filepath });
entity.ToTable("FileCache");
entity.Property(c => c.Version).HasDefaultValue(0).IsRowVersion();
});
OnModelCreatingPartial(modelBuilder);