mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Storage - Fix new profile creation
UI - Fix a crash when dragging and dropping in the sidebar
This commit is contained in:
1 parent
18d75318d9
commit
7e981a61d3
9 files changed
+27
-34
No files matched your search
@@ -30,6 +30,8 @@ public class ProfileRepository(ILogger logger, Func<ArtemisDbContext> getContext
|
||||
|
||||
public void Save(ProfileContainerEntity profileContainerEntity)
|
||||
{
|
||||
profileContainerEntity.ProfileConfiguration.Version = profileMigrators.Max(m => m.Version);
|
||||
|
||||
using ArtemisDbContext dbContext = getContext();
|
||||
dbContext.Update(profileContainerEntity);
|
||||
dbContext.SaveChanges();
|
||||
@@ -37,6 +39,9 @@ public class ProfileRepository(ILogger logger, Func<ArtemisDbContext> getContext
|
||||
|
||||
public void SaveRange(List<ProfileContainerEntity> profileContainerEntities)
|
||||
{
|
||||
foreach (ProfileContainerEntity profileContainerEntity in profileContainerEntities)
|
||||
profileContainerEntity.ProfileConfiguration.Version = profileMigrators.Max(m => m.Version);
|
||||
|
||||
using ArtemisDbContext dbContext = getContext();
|
||||
dbContext.UpdateRange(profileContainerEntities);
|
||||
dbContext.SaveChanges();
|
||||
|
||||
Reference in new issue
Block a user