public Customer GetEntity(BusinApp businApp, string FundCode) { // 方法出现异常 //throw new Exception("Throw an Exception."); // 返回 null //return null; // 正常返回 return(GetCustomerList().First <Customer>()); }
public ResultInfo <Customer> GetResultInfoEntity(BusinApp businApp, string FundCode) { // 方法出现异常 //throw new Exception("Throw an Exception."); // 返回 null //return null; // ResultInfo.Result 为 null //return new ResultInfo<Customer> { Result = null }; // 正常返回 return(new ResultInfo <Customer> { Result = GetCustomerList().First <Customer>() }); }