Example #1
0
 // copy all columns from a SOAP Contract to a serialized data object
 // links:
 //  docLink: http://sql2x.org/documentationLink/10700d38-2227-4021-be12-2f4f206f5dd9
 public static void ContractToData(CrudeFerryContract contract, CrudeFerryData data)
 {
     data.FerryId             = contract.FerryId;
     data.FerryName           = contract.FerryName;
     data.FerryTypeRcd        = contract.FerryTypeRcd;
     data.ProductId           = contract.ProductId;
     data.FirstFloatDateTime  = contract.FirstFloatDateTime;
     data.OperationalDateTime = contract.OperationalDateTime;
     data.EngineType          = contract.EngineType;
     data.PassengerCapacity   = contract.PassengerCapacity;
     data.UserId   = contract.UserId;
     data.DateTime = contract.DateTime;
 }
Example #2
0
        // 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 <CrudeFerryModel> FetchWithFilter(System.Guid ferryId, string ferryName, string ferryTypeRcd, System.Guid productId, System.DateTime firstFloatDateTime, System.DateTime operationalDateTime, string engineType, int passengerCapacity, System.Guid userId, System.DateTime dateTime)
        {
            var list = new List <CrudeFerryModel>();
            List <CrudeFerryData> dataList = CrudeFerryData.FetchWithFilter(ferryId, ferryName, ferryTypeRcd, productId, firstFloatDateTime, operationalDateTime, engineType, passengerCapacity, userId, dateTime);

            foreach (CrudeFerryData data in dataList)
            {
                var crudeFerryBusinessModel = new CrudeFerryModel();
                DataToModel(data, crudeFerryBusinessModel);
                list.Add(crudeFerryBusinessModel);
            }

            return(list);
        }
Example #3
0
        // 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 <CrudeFerryModel> FetchAllWithLimitAndOffset(string limit, string offset)
        {
            var list = new List <CrudeFerryModel>();
            List <CrudeFerryData> dataList = CrudeFerryData.FetchAllWithLimitAndOffset(int.Parse(limit), int.Parse(offset));

            foreach (CrudeFerryData crudeFerryBusiness in dataList)
            {
                var model = new CrudeFerryModel();
                DataToModel(crudeFerryBusiness, model);
                list.Add(model);
            }

            return(list);
        }
Example #4
0
        // copy all rows from a List of serialized data objects in CrudeFerryData to a List of SOAP Contracts
        // links:
        //  docLink: http://sql2x.org/documentationLink/3d3e60c3-69e4-43d6-8bd5-14a67a6ecf58
        public List <CrudeFerryModel> FetchAll()
        {
            var list = new List <CrudeFerryModel>();
            List <CrudeFerryData> dataList = CrudeFerryData.FetchAll();

            foreach (CrudeFerryData crudeFerryBusiness in dataList)
            {
                var model = new CrudeFerryModel();
                DataToModel(crudeFerryBusiness, model);
                list.Add(model);
            }

            return(list);
        }
Example #5
0
        // copy all rows from a List of serialized data objects to a List of SOAP Contracts,
        //  with a limit on number of returned rows and order by columns, starting at a specific row
        // links:
        //  docLink: http://sql2x.org/documentationLink/3fe9f1b3-97b6-4f58-a0f2-adfcbd973bfc
        public List <CrudeFerryContract> FetchAllWithLimitAndOffset(int limit, int offset)
        {
            var list = new List <CrudeFerryContract>();
            List <CrudeFerryData> dataList = CrudeFerryData.FetchAllWithLimitAndOffset(limit, offset);

            foreach (CrudeFerryData crudeFerry in dataList)
            {
                var contract = new CrudeFerryContract();
                DataToContract(crudeFerry, contract);
                list.Add(contract);
            }

            return(list);
        }
Example #6
0
        // copy all rows from a List of serialized data objects in CrudeFerryData to a List of SOAP Contracts
        // links:
        //  docLink: http://sql2x.org/documentationLink/9204c68e-93b8-4c77-af3c-3181985ff75f
        public List <CrudeFerryContract> FetchAll()
        {
            var list = new List <CrudeFerryContract>();
            List <CrudeFerryData> dataList = CrudeFerryData.FetchAll();

            foreach (CrudeFerryData crudeFerry in dataList)
            {
                var contract = new CrudeFerryContract();
                DataToContract(crudeFerry, contract);
                list.Add(contract);
            }

            return(list);
        }
Example #7
0
 // fetch by Search key into current object
 // links:
 //  crud definition: https://en.wikipedia.org/wiki/Create,_read,_update_and_delete
 //  docLink: http://sql2x.org/documentationLink/87368fa6-b618-4f0c-acbb-1fc4e273bb2d
 // parameters:
 //  ProductId: key of table CrudeFerryData
 public List <CrudeFerryModel> FetchByProductId(System.Guid productId)
 {
     return(DataListToModelList(CrudeFerryData.FetchByProductId(productId)));
 }
Example #8
0
 // fetch by Search key into current object
 // links:
 //  crud definition: https://en.wikipedia.org/wiki/Create,_read,_update_and_delete
 //  docLink: http://sql2x.org/documentationLink/87368fa6-b618-4f0c-acbb-1fc4e273bb2d
 // parameters:
 //  FerryTypeRcd: key of table CrudeFerryData
 public List <CrudeFerryModel> FetchByFerryTypeRcd(string ferryTypeRcd)
 {
     return(DataListToModelList(CrudeFerryData.FetchByFerryTypeRcd(ferryTypeRcd)));
 }
Example #9
0
 // delete row
 // links:
 //  docLink: http://sql2x.org/documentationLink/59823bf7-4ad8-4684-a48b-2abd49c607ee
 public void Delete(System.Guid ferryId)
 {
     CrudeFerryData.Delete(ferryId);
 }
Example #10
0
 // get a count of rows in table
 // links:
 //  docLink: http://sql2x.org/documentationLink/39677f9e-daee-45c6-9527-da98a0d7958d
 public int FetchAllCount()
 {
     return(CrudeFerryData.FetchAllCount());
 }
Example #11
0
 // fetch by Search key into current object
 // links:
 //  crud definition: https://en.wikipedia.org/wiki/Create,_read,_update_and_delete
 //  docLink: http://sql2x.org/documentationLink/87368fa6-b618-4f0c-acbb-1fc4e273bb2d
 // parameters:
 //  UserId: key of table CrudeFerryData
 public List <CrudeFerryModel> FetchByUserId(System.Guid userId)
 {
     return(DataListToModelList(CrudeFerryData.FetchByUserId(userId)));
 }
Example #12
0
 // fetch by Foreign key into new List of class instances
 // links:
 //  docLink: http://sql2x.org/documentationLink/a7599485-4f00-4ebf-974d-53f69c43654e
 public List <CrudeFerryContract> FetchByFerryTypeRcd(string ferryTypeRcd)
 {
     return(DataListToContractList(CrudeFerryData.FetchByFerryTypeRcd(ferryTypeRcd)));
 }
Example #13
0
 // fetch by Foreign key into new List of class instances
 // links:
 //  docLink: http://sql2x.org/documentationLink/a7599485-4f00-4ebf-974d-53f69c43654e
 public List <CrudeFerryContract> FetchByUserId(System.Guid userId)
 {
     return(DataListToContractList(CrudeFerryData.FetchByUserId(userId)));
 }
Example #14
0
 // fetch by Foreign key into new List of class instances
 // links:
 //  docLink: http://sql2x.org/documentationLink/a7599485-4f00-4ebf-974d-53f69c43654e
 public List <CrudeFerryContract> FetchByProductId(System.Guid productId)
 {
     return(DataListToContractList(CrudeFerryData.FetchByProductId(productId)));
 }