| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- using System.Linq.Expressions;
- using DataLayer.Interfaces;
- using Domain;
- using Services.Interfaces;
- namespace Services;
- public class PlayerService : IPlayerService
- {
- private readonly IAbstractRepository<Player> _playerRepository;
- public PlayerService(IPlayerRepository playerRepository)
- {
- _playerRepository = playerRepository;
- }
- public Task Add(Player entity)
- {
- throw new NotImplementedException();
- }
- public Task<int> CountAll()
- {
- throw new NotImplementedException();
- }
- public Task<int> CountWhere(Expression<Func<Player, bool>> predicate)
- {
- throw new NotImplementedException();
- }
- public Task<Player> FirstOrDefault(Expression<Func<Player, bool>> predicate)
- {
- throw new NotImplementedException();
- }
- public async Task<IEnumerable<Player>> GetAll()
- {
- try
- {
- var players = await _playerRepository.GetAll();
- return players;
- }
- catch (Exception e)
- {
- throw;
- }
- }
- public async Task<Player> GetById(int id)
- {
- return await _playerRepository.GetById(id);
- }
- public Task<IEnumerable<Player>> GetWhere(Expression<Func<Player, bool>> predicate)
- {
- throw new NotImplementedException();
- }
- public Task Remove(Player entity)
- {
- throw new NotImplementedException();
- }
- public Task Update(Player entity)
- {
- throw new NotImplementedException();
- }
- }
|