public List <GetAdGiverMaterialsForSearchResult> GetSearchedMaterialsForListView(Int64?categoryID, string userId, string materialCode, DateTime?fromDate, DateTime?toDate) { try { OiiOHaatDCDataContext db = DatabaseHelper.GetDataModelDataContext(); var materialList = db.GetAdGiverMaterialsForSearch(categoryID, userId, materialCode, fromDate, toDate).ToList(); return(materialList); } catch (Exception ex) { throw new Exception(ex.Message, ex); } }