AbstractRepositoryService.cs 631 B

1234567891011121314151617
  1. using System;
  2. using System.Security.Principal;
  3. using Quadarax.Foundation.Core.Logging;
  4. using Quadarax.Foundation.Core.Data.Interface.Repository;
  5. namespace Quadarax.Foundation.Core.Business
  6. {
  7. public abstract class AbstractRepositoryService<TRepository> : AbstractService where TRepository: IRepository
  8. {
  9. protected TRepository Repository { get; }
  10. protected AbstractRepositoryService(TRepository repository,IPrincipal currentPrincipal, ILogger logger) : base(currentPrincipal, logger)
  11. {
  12. Repository = repository ?? throw new ArgumentNullException(nameof(repository));
  13. }
  14. }
  15. }