public RequestBuilder Handler(string file, string provider, int fileNumber) { ObjectAdapter adapter = FileAdapter.Load(file, new SpireXlsLoader()); IEnumerable <IdentificationRecordExcel> records = adapter.Records <IdentificationRecordExcel>(true); if (records.Any(r => !r.IsValid)) { return(new BadRequstBuilder(file, records.Where(r => !r.IsValid))); } return(new IdentificationRequestBuilder(file, records.Where(r => r.IsValid), provider, fileNumber, 10000)); }