예제 #1
0
        // fetch by Primary key into current object
        // links:
        //  crud definition: https://en.wikipedia.org/wiki/Create,_read,_update_and_delete
        //  docLink: http://sql2x.org/documentationLink/bbab4791-c9e7-49bf-90d5-fca19b1fedaa
        // parameters:
        //  countryId: primary key of table country
        public CrudeCountryContract FetchByCountryId(System.Guid countryId)
        {
            var dataAccessLayer = new CrudeCountryData();
            var contract        = new CrudeCountryContract();

            dataAccessLayer.FetchByCountryId(countryId);
            DataToContract(dataAccessLayer, contract);

            return(contract);
        }
예제 #2
0
        // fetch by Primary key into current object
        // links:
        //  crud definition: https://en.wikipedia.org/wiki/Create,_read,_update_and_delete
        //  docLink: http://sql2x.org/documentationLink/fdcc33b4-08f1-43c3-ae28-95fbf029c3bd
        // parameters:
        //  CrudeCountryData: primary key of table CrudeCountryData
        public CrudeCountryModel FetchByCountryId(System.Guid countryId)
        {
            var dataAccessLayer = new CrudeCountryData();
            var model           = new CrudeCountryModel();

            dataAccessLayer.FetchByCountryId(countryId);
            DataToModel(dataAccessLayer, model);

            return(model);
        }