Пример #1
0
        public static Product GetProduct(int productId)
        {
            string sql   = @"SELECT ProductID, Name, Detail, Price FROM Products";
            var    parms = new Dictionary <string, object>();

            parms.Add("@ProductID", productId);
            return(AdoDataAccess.Read(sql, MakeDataObject, parms));
        }
Пример #2
0
        public static List <Product> GetProducts()
        {
            string sql = @"SELECT ProductID, Name, Detail, Price FROM Products";

            return(AdoDataAccess.ReadList(sql, MakeDataObject));
        }