// fetch all from table into new List of class instances, filtered by any column // links: // docLink: http://sql2x.org/documentationLink/db27658d-4d23-46d7-9970-7bbaef8634b0 public List <CrudeServicePackagePromotionModel> FetchWithFilter(System.Guid servicePackagePromotionId, System.Guid servicePackageId, decimal promotionPriceAmount, System.Guid financialCurrencyId, System.Guid userId, System.DateTime dateTime, System.Guid bookingId, System.Guid clientId) { var list = new List <CrudeServicePackagePromotionModel>(); List <CrudeServicePackagePromotionData> dataList = CrudeServicePackagePromotionData.FetchWithFilter(servicePackagePromotionId, servicePackageId, promotionPriceAmount, financialCurrencyId, userId, dateTime, bookingId, clientId); foreach (CrudeServicePackagePromotionData data in dataList) { var crudeServicePackagePromotionBusinessModel = new CrudeServicePackagePromotionModel(); DataToModel(data, crudeServicePackagePromotionBusinessModel); list.Add(crudeServicePackagePromotionBusinessModel); } return(list); }
// fetch all rows from table into new List of Contracts, filtered by any column // links: // docLink: http://sql2x.org/documentationLink/ce01ef4a-5cd0-4e51-b211-9c0a15b791a0 public List <CrudeServicePackagePromotionContract> FetchWithFilter(System.Guid servicePackagePromotionId, System.Guid servicePackageId, decimal promotionPriceAmount, System.Guid financialCurrencyId, System.Guid userId, System.DateTime dateTime, System.Guid bookingId, System.Guid clientId) { var list = new List <CrudeServicePackagePromotionContract>(); List <CrudeServicePackagePromotionData> dataList = CrudeServicePackagePromotionData.FetchWithFilter( servicePackagePromotionId: servicePackagePromotionId, servicePackageId: servicePackageId, promotionPriceAmount: promotionPriceAmount, financialCurrencyId: financialCurrencyId, userId: userId, dateTime: dateTime, bookingId: bookingId, clientId: clientId ); foreach (CrudeServicePackagePromotionData data in dataList) { var crudeServicePackagePromotionContract = new CrudeServicePackagePromotionContract(); DataToContract(data, crudeServicePackagePromotionContract); list.Add(crudeServicePackagePromotionContract); } return(list); }