mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 19:36:28 +00:00
Opting for precompiled plugins, removed CS-Script
Cleaned up Nuget packages Cleaned up references
This commit is contained in:
1 parent
d5db17c0e3
commit
4e565f9d76
18 files changed
+133
-426
No files matched your search
@@ -3,15 +3,14 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net461</TargetFramework>
|
||||
<Platforms>AnyCPU;x64</Platforms>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.3" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.2.3" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.3" />
|
||||
</ItemGroup>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Migrations\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.2.4" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="2.2.4" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.4" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -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