This question is locked. New answers and comments are not allowed.
Hi
I have a TestClass which defines as follows:
I wanted to fetch some records from database using LINQ so i used the following code:
but i get this run-time error for the last line of code:
An exception occured during the execution of '
Extent<WindowsFormsApplication2.TestClass>.Where(c => c.NameValue.Matches("Test"))'. See InnerException for more details.
The strange thing is that when i omit the "where c.NameValue.Matches("Test")" line, everything works fine.
Can anybody tell me what's the problem?
I have a TestClass which defines as follows:
[Telerik.OpenAccess.Persistent(IdentityField = "_id")] public class TestClass { private int _id; private int _parentID; private string _nameValue; public int ID { get { return _id; } set { _id = value; } } public int ParentID { get { return _parentID; } set { _parentID = value; } } public string NameValue { get { return _nameValue; } set { _nameValue = value; } } }I wanted to fetch some records from database using LINQ so i used the following code:
IObjectScope scope = ObjectScopeProvider1.ObjectScope();var result = from c in scope.Extent<TestClass>() where c.NameValue.Matches("Test") select c;objectView1.DataSource = result.ToList();but i get this run-time error for the last line of code:
An exception occured during the execution of '
Extent<WindowsFormsApplication2.TestClass>.Where(c => c.NameValue.Matches("Test"))'. See InnerException for more details.
The strange thing is that when i omit the "where c.NameValue.Matches("Test")" line, everything works fine.
Can anybody tell me what's the problem?