// 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 <CrudeServiceHotelModel> FetchWithFilter(System.Guid serviceHotelId, string hotelName, decimal dayPriceAmount, System.Guid financialCurrencyId, System.Guid addressId, System.Guid productId, System.Guid userId, System.DateTime dateTime) { var list = new List <CrudeServiceHotelModel>(); List <CrudeServiceHotelData> dataList = CrudeServiceHotelData.FetchWithFilter(serviceHotelId, hotelName, dayPriceAmount, financialCurrencyId, addressId, productId, userId, dateTime); foreach (CrudeServiceHotelData data in dataList) { var crudeServiceHotelBusinessModel = new CrudeServiceHotelModel(); DataToModel(data, crudeServiceHotelBusinessModel); list.Add(crudeServiceHotelBusinessModel); } 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 <CrudeServiceHotelContract> FetchWithFilter(System.Guid serviceHotelId, string hotelName, decimal dayPriceAmount, System.Guid financialCurrencyId, System.Guid addressId, System.Guid productId, System.Guid userId, System.DateTime dateTime) { var list = new List <CrudeServiceHotelContract>(); List <CrudeServiceHotelData> dataList = CrudeServiceHotelData.FetchWithFilter( serviceHotelId: serviceHotelId, hotelName: hotelName, dayPriceAmount: dayPriceAmount, financialCurrencyId: financialCurrencyId, addressId: addressId, productId: productId, userId: userId, dateTime: dateTime ); foreach (CrudeServiceHotelData data in dataList) { var crudeServiceHotelContract = new CrudeServiceHotelContract(); DataToContract(data, crudeServiceHotelContract); list.Add(crudeServiceHotelContract); } return(list); }