public async Task <IActionResult> UploadCommRate([FromForm] FileUpload model) { if (model.File.Length == 0) { return(BadRequest()); } var dataSet = await SharedServices.ExcelToDataSet(model); List <P> parameters = new List <P> { new P { Key = "Data_PB_CommRatesImport", Value = SharedServices.StringAllColumns(dataSet.Tables[0]) }, new P { Key = "AddBy", Value = Current.UserID } }; var ds = dbServices.SpCaller(name: "dbo.PB_CommRatesImport", parameters: parameters); return(Ok(ds.Tables[0])); }