public async Task ExcelUploadBusinessTest_UploadFiles_Sucess() { var model = new ExcelUploadModel() { Name = "test", Content = FileHelper.ReadBytes($"{baseLocation}//Sample Excel_valid.xlsx") }; var res = await _uploadBusinessService.Upload(model); res.Should().NotBeNull(); res.HttpStatusCode.Should().Be(StatusCodes.Sucess); }
public async Task <ExcelUploadResponseModel> Upload(ExcelUploadModel model) { try { return(await _businessService.Upload(model)); } catch (Exception ex) { throw new FaultException <FaultModel>(new FaultModel { Exception = ex.InnerException, Message = ex.Message }); } }
public async Task <ExcelResponseModel> Upload([FromBody] ExcelUploadModel model) { return(await _uploadBusinessService.Upload(model)); }