using Hushian.Application.Contracts.Persistence;
using Hushian.Domain.Entites;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Hushian.Application.Services
{
    public class UserService
    {
        private readonly IGenericRepository<User> _UserRepository;

        public UserService(IGenericRepository<User> userRepository)
        {
            _UserRepository = userRepository;
        }

        public async Task<bool> AnyUser(int UserID) =>await _UserRepository.Get().AnyAsync(a=>a.ID==UserID);

    }
}
