Moved from SQLITE to EntityFramework.
Lots of things are broken!
This commit is contained in:
20
SharedLibrary/Interfaces/IEntityService.cs
Normal file
20
SharedLibrary/Interfaces/IEntityService.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SharedLibrary.Interfaces
|
||||
{
|
||||
public interface IEntityService<T>
|
||||
{
|
||||
Task<T> CreateProxy();
|
||||
Task<T> Create(T entity);
|
||||
Task<T> Delete(T entity);
|
||||
Task<T> Update(T entity);
|
||||
Task<T> Get(int entityID);
|
||||
Task<T> GetUnique(string entityProperty);
|
||||
Task<IList<T>> Find(Func<T, bool> expression);
|
||||
}
|
||||
}
|
@ -1,4 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using SharedLibrary.Objects;
|
||||
using SharedLibrary.Database.Models;
|
||||
using SharedLibrary.Services;
|
||||
|
||||
namespace SharedLibrary.Interfaces
|
||||
{
|
||||
@ -10,13 +13,10 @@ namespace SharedLibrary.Interfaces
|
||||
ILogger GetLogger();
|
||||
IList<Server> GetServers();
|
||||
IList<Command> GetCommands();
|
||||
IPenaltyList GetClientPenalties();
|
||||
ClientsDB GetClientDatabase();
|
||||
AliasesDB GetAliasesDatabase();
|
||||
IList<Helpers.MessageToken> GetMessageTokens();
|
||||
IList<Player> GetActiveClients();
|
||||
IList<Player> GetAliasClients(Player player);
|
||||
IList<Aliases> GetAliases(Player player);
|
||||
IList<Player> GetPrivilegedClients();
|
||||
ClientService GetClientService();
|
||||
AliasService GetAliasService();
|
||||
PenaltyService GetPenaltyService();
|
||||
}
|
||||
}
|
||||
|
@ -1,15 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SharedLibrary.Interfaces
|
||||
{
|
||||
public interface IPenaltyList
|
||||
{
|
||||
void AddPenalty(Penalty P);
|
||||
void RemovePenalty(Penalty P);
|
||||
List<Penalty> FindPenalties(Player P);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user