public void Initialize() { _fileStoreProxy = new FileStoreProxy(); _excelReader = new OleDbExcelReader(); _unitOfWork = new UnitOfWork(new SchoolEntities()); _uploadBusinessService = new UploadBusinessService(_excelReader, _unitOfWork, _fileStoreProxy); }
public UploadBusinessService(IExcelReader excelReader, IUnitOfWork unitOfWork, IFileStoreProxy fileStoreProxy) { _fileStoreProxy = fileStoreProxy ?? throw new ArgumentNullException(nameof(fileStoreProxy)); _excelReader = excelReader ?? throw new ArgumentNullException(nameof(excelReader)); _unitOfWork = unitOfWork ?? throw new ArgumentNullException(nameof(unitOfWork)); }