public AjaxResult Delete([FromBody] List <Guid> listID) { var ajaxresult = new AjaxResult(); try { using (FundBL fundBL = new FundBL()) { foreach (var id in listID) { fundBL.DeleteFundBL(id); } ajaxresult.Data = fundBL.GetAllFund(); } ajaxresult.Success = true; } catch (Exception ex) { ajaxresult.Success = false; ajaxresult.Data = ex; ajaxresult.Message = Resources.ErrorDeleteFund; } return(ajaxresult); }
public async Task <AjaxResult> Get() { var ajaxresult = new AjaxResult(); try { await Task.Delay(500); using (FundBL fundBL = new FundBL()) { ajaxresult.Data = fundBL.GetAllFund(); ajaxresult.Success = true; } } catch (Exception ex) { ajaxresult.Success = false; ajaxresult.Data = ex; ajaxresult.Message = Resources.ErrorGetListFund; } return(ajaxresult); }