public override List <Return> GetOnlineReturnsByPurposeDAL(PurposeOfReturn purpose) { List <Return> matchingOnlineReturns = new List <Return>(); try { matchingOnlineReturns = onlineReturnList.FindAll( (item) => { return(item.Purpose == purpose); } ); } catch (Exception) { throw; } return(matchingOnlineReturns); }
/// <summary> /// Gets onlinereturn based on PurposeOfReturn. /// </summary> /// <param name="purposeOfReturn">Represents purposeOfReturn to search.</param> /// <returns>Returns OnlineReturn object.</returns> public async Task <List <OnlineReturn> > GetOnlineReturnsByPurposeBL(PurposeOfReturn purpose) { List <OnlineReturn> matchingOnlineReturns = new List <OnlineReturn>(); try { await Task.Run(() => { matchingOnlineReturns = onlineReturnDAL.GetOnlineReturnsByPurposeDAL(purpose); }); } catch (Exception) { throw; } return(matchingOnlineReturns); }
public abstract List <OnlineReturn> GetOnlineReturnsByPurposeDAL(PurposeOfReturn purpose);