/// <summary> /// private static cstor that is used to init an /// instance of this class as a singleton /// </summary> static DataProvider() { instance = (DataProvider)Reflection.CreateObject("data", "YourCompany.Demo.Components", ""); }
/// <summary> /// Get an info object from the database /// </summary> /// <param name="moduleId"></param> /// <param name="itemId"></param> /// <returns></returns> public DemoInfo GetDemo(int moduleId, int itemId) { return((DemoInfo)CBO.FillObject(DataProvider.Instance().GetDemo(moduleId, itemId), typeof(DemoInfo))); }
/// <summary> /// Delete a given item from the database /// </summary> /// <param name="moduleId"></param> /// <param name="itemId"></param> public void DeleteDemo(int moduleId, int itemId) { DataProvider.Instance().DeleteDemo(moduleId, itemId); }
/// <summary> /// Gets all the DemoInfo objects for items matching the this moduleId /// </summary> /// <param name="moduleId"></param> /// <returns></returns> public List <DemoInfo> GetDemos(int moduleId) { return(CBO.FillCollection <DemoInfo>(DataProvider.Instance().GetDemos(moduleId))); }