예제 #1
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/ad2dd952-e3ec-471a-9e34-f5fc965b8b37
        // parameters:
        //  ProductName: key of table CrudeProductData
        public CrudeProductModel FetchByProductName(string productName)
        {
            var dataAccessLayer = new CrudeProductData();
            var model           = new CrudeProductModel();

            dataAccessLayer.FetchByProductName(productName);
            DataToModel(dataAccessLayer, model);

            return(model);
        }
예제 #2
0
        public CrudeProductContract FetchByProductName(string productName)
        {
            var dataAccessLayer = new CrudeProductData();
            var contract        = new CrudeProductContract();

            dataAccessLayer.FetchByProductName(productName);
            DataToContract(dataAccessLayer, contract);

            return(contract);
        }