mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Fully implemented the surface service which contains all storage logic
This commit is contained in:
1 parent
4e2afad268
commit
91cd23dadf
8 files changed
+284
-117
No files matched your search
@@ -7,6 +7,7 @@ namespace Artemis.Storage.Repositories.Interfaces
|
||||
public interface ISurfaceRepository : IRepository
|
||||
{
|
||||
void Add(SurfaceEntity surfaceEntity);
|
||||
void Remove(SurfaceEntity surfaceEntity);
|
||||
SurfaceEntity Get(string name);
|
||||
Task<SurfaceEntity> GetAsync(string name);
|
||||
List<SurfaceEntity> GetAll();
|
||||
|
||||
@@ -22,6 +22,11 @@ namespace Artemis.Storage.Repositories
|
||||
_dbContext.Surfaces.Add(surfaceEntity);
|
||||
}
|
||||
|
||||
public void Remove(SurfaceEntity surfaceEntity)
|
||||
{
|
||||
_dbContext.Surfaces.Remove(surfaceEntity);
|
||||
}
|
||||
|
||||
public SurfaceEntity Get(string name)
|
||||
{
|
||||
return _dbContext.Surfaces.Include(s => s.SurfacePositions).FirstOrDefault(p => p.Name == name);
|
||||
|
||||
Reference in new issue
Block a user