// fetch all rows from table with an offset, and limit of rows // links: // docLink: http://sql2x.org/documentationLink/a87e5c54-b47e-4031-bc3b-837b4cf9f692 public List <CrudeServiceCarRentalModel> FetchAllWithLimitAndOffset(string limit, string offset) { var list = new List <CrudeServiceCarRentalModel>(); List <CrudeServiceCarRentalData> dataList = CrudeServiceCarRentalData.FetchAllWithLimitAndOffset(int.Parse(limit), int.Parse(offset)); foreach (CrudeServiceCarRentalData crudeServiceCarRentalBusiness in dataList) { var model = new CrudeServiceCarRentalModel(); DataToModel(crudeServiceCarRentalBusiness, model); list.Add(model); } return(list); }
// 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 <CrudeServiceCarRentalModel> FetchWithFilter(System.Guid serviceCarRentalId, string carName, decimal dayPriceAmount, System.Guid financialCurrencyId, System.Guid addressId, System.Guid productId, System.Guid userId, System.DateTime dateTime) { var list = new List <CrudeServiceCarRentalModel>(); List <CrudeServiceCarRentalData> dataList = CrudeServiceCarRentalData.FetchWithFilter(serviceCarRentalId, carName, dayPriceAmount, financialCurrencyId, addressId, productId, userId, dateTime); foreach (CrudeServiceCarRentalData data in dataList) { var crudeServiceCarRentalBusinessModel = new CrudeServiceCarRentalModel(); DataToModel(data, crudeServiceCarRentalBusinessModel); list.Add(crudeServiceCarRentalBusinessModel); } return(list); }
// copy all rows from a List of serialized data objects in CrudeServiceCarRentalData to a List of SOAP Contracts // links: // docLink: http://sql2x.org/documentationLink/3d3e60c3-69e4-43d6-8bd5-14a67a6ecf58 public List <CrudeServiceCarRentalModel> FetchAll() { var list = new List <CrudeServiceCarRentalModel>(); List <CrudeServiceCarRentalData> dataList = CrudeServiceCarRentalData.FetchAll(); foreach (CrudeServiceCarRentalData crudeServiceCarRentalBusiness in dataList) { var model = new CrudeServiceCarRentalModel(); DataToModel(crudeServiceCarRentalBusiness, model); list.Add(model); } return(list); }
public CrudeServiceCarRentalModel CrudeServiceCarRentalUpdate([Bind()] CrudeServiceCarRentalModel serviceCarRental) { new CrudeServiceCarRentalBusiness().Update(serviceCarRental); return(serviceCarRental); }