try another way to implement the data stucture

This commit is contained in:
2020-09-30 22:05:18 +02:00
parent 410062daae
commit 1b387adae1
19 changed files with 234 additions and 257 deletions

View File

@ -5,40 +5,39 @@ using System.Collections.Generic;
using System.Linq.Expressions;
using System.Threading;
using System.Threading.Tasks;
using DataModels;
using LinqToDB;
using UserService.DatabaseLayer.DataModels;
using UserService.Infrastructure.DataModels;
namespace UserService.DatabaseLayer.Repositories
{
public class SecurityGroupsRepository : ISecurityGroupsRepository
{
/// <inheritdoc />
public async Task<IReadOnlyList<SecurityGroup>> GetAllAsync(Expression<Func<SecurityGroup, bool>>? predicate = null, CancellationToken token = default)
public Task<IReadOnlyList<SecurityGroup>> GetAllAsync(Expression<Func<NodeModel, bool>>? predicate = null, CancellationToken token = default)
{
throw new NotImplementedException();
}
public Task<SecurityGroup?> GetAsync(Expression<Func<NodeModel, bool>> predicate, CancellationToken token = default)
{
throw new NotImplementedException();
}
/// <inheritdoc />
public async Task<SecurityGroup?> GetAsync(Expression<Func<SecurityGroup, bool>> predicate, CancellationToken token = default)
public Task AddAsync(SecurityGroup entity, CancellationToken token = default)
{
throw new NotImplementedException();
}
/// <inheritdoc />
public async Task AddAsync(SecurityGroup entity, CancellationToken token = default)
public Task<bool> UpdateAsync(SecurityGroup entity, CancellationToken token = default)
{
throw new NotImplementedException();
}
/// <inheritdoc />
public async Task<bool> UpdateAsync(SecurityGroup entity, CancellationToken token = default)
{
throw new NotImplementedException();
}
/// <inheritdoc />
public async Task DeleteAsync(SecurityGroup entity, CancellationToken token = default)
{
throw new NotImplementedException();
await using var db = new UserService2DB();
await db.NodeModels.DeleteAsync(x => x.Id == entity.Id, token).ConfigureAwait(false);
}
}
}