コード例 #1
0
        public List <Implementer> Select()
        {
            ImplementerParser implementersParser = new ImplementerParser();
            DataTable         dataTable          = new DataTable();
            string            sqlExpression      = "Select *  from Implementers";

            dataTable = connection.Select(sqlExpression);
            List <Implementer> implementers = implementersParser.Parse(dataTable);

            return(implementers);
        }
コード例 #2
0
        public Implementer SelectById(int id)
        {
            ImplementerParser implementersParser = new ImplementerParser();
            DataTable         dataTable          = new DataTable();
            string            sqlExpression      = string.Format("Select *  from Implementers where Id={0}", id);

            dataTable = connection.Select(sqlExpression);
            List <Implementer> implementers = implementersParser.Parse(dataTable);
            Implementer        implementer  = implementers.FirstOrDefault();

            return(implementer);
        }