private readonly IValidationService _validationService; //if something goes unexpected on the business validations public ContactService( ILogger <ContactService> logger, SqlService sqlService, IValidator <Contact> contactValidator, IValidationService validationService ) { _logger = logger; _sqlService = sqlService; _contactValidator = contactValidator; _validationService = validationService; }
public UserService( IValidator <User> userValidator, SqlService sqlService, IValidationService validationService, IAuthenticatedService authenticatedService, ILogger <UserService> logger, IContactService contactService ) { _userValidator = userValidator; _sqlService = sqlService; _validationService = validationService; _authenticatedService = authenticatedService; _logger = logger; _contactService = contactService; }