Exemplo n.º 1
0
        public MaterialCollection GetMaterials()
        {
            MaterialCollection materials = new MaterialCollection();

            IDataReader dr = new MaterialDataAdapter().GetMaterials();
            while (dr.Read())
            {
                materials.Add(PopulateReader(dr));
            }
            return materials;
        }
Exemplo n.º 2
0
        public Material GetMaterial(string id)
        {
            Material material = new Material();

            IDataReader dr = new MaterialDataAdapter().GetMaterialById(id);
            if (dr.Read())
            {
                material = PopulateReader(dr);
            }
            return material;
        }