mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Opting for precompiled plugins, removed CS-Script
Cleaned up Nuget packages Cleaned up references
This commit is contained in:
1 parent
1ae5a18c8e
commit
aa32c8aae4
18 files changed
+133
-426
No files matched your search
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Artemis.Storage.Entities;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace Artemis.Storage.Repositories
|
||||
{
|
||||
public class ProfileRepository
|
||||
{
|
||||
private readonly StorageContext _dbContext;
|
||||
|
||||
public ProfileRepository()
|
||||
{
|
||||
_dbContext = new StorageContext();
|
||||
}
|
||||
|
||||
public IQueryable<ProfileEntity> GetAll()
|
||||
{
|
||||
return _dbContext.Profiles;
|
||||
}
|
||||
|
||||
public async Task<IList<ProfileEntity>> GetByPluginGuidAsync(Guid pluginGuid)
|
||||
{
|
||||
return await _dbContext.Profiles.Where(p => p.PluginGuid == pluginGuid).ToListAsync();
|
||||
}
|
||||
|
||||
public async Task<ProfileEntity> GetByGuidAsync(string guid)
|
||||
{
|
||||
return await _dbContext.Profiles.FirstOrDefaultAsync(p => p.Guid == guid);
|
||||
}
|
||||
|
||||
public async Task SaveAsync()
|
||||
{
|
||||
await _dbContext.SaveChangesAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user