Mini Kabibi Habibi

Current Path : C:/Users/Public/Documents/DXperience 13.1 Demos/ASP.NET/CS/MVCDemos.Razor/Models/
Upload File :
Current File : C:/Users/Public/Documents/DXperience 13.1 Demos/ASP.NET/CS/MVCDemos.Razor/Models/BinaryImages.cs

using System.Collections;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace DevExpress.Web.Demos {
    public static class BinaryImages {
        public static IEnumerable GetData(int? categoryId = null) {
            string selectCommand = "SELECT * FROM BinaryImages ";
            if(categoryId != null)
                selectCommand += string.Format("WHERE CategoryID = {0}", categoryId);
            using(AccessDataSource dataSource = new AccessDataSource("~/App_Data/binary_images.mdb", selectCommand))
                return dataSource.Select(new DataSourceSelectArguments());
        }
    }
}