using System;
using System.Security.Principal;
using Microsoft.Extensions.Logging;
using NLog;
using Quadarax.Foundation.Core.Data.Interface.Repository;

namespace Quadarax.Foundation.Core.Business
{
    public abstract class AbstractRepositoryService<TRepository> : AbstractService where TRepository: IRepository
    {
        protected TRepository Repository { get; }

        protected AbstractRepositoryService(TRepository repository,IPrincipal currentPrincipal, ILoggerFactory logger) : base(currentPrincipal, logger)
        {
            Repository = repository ?? throw new ArgumentNullException(nameof(repository));
        }
    }
}
