Hi guys...
How should I use this in .NET 2.0 ...?
[DataObjectMethod(DataObjectMethodType.Select)]
public IEnumerable<OperatorField> FindByType(String type)
{
// return only selected type
return (from ce in this.OperatorFields where ce.Type == type select ce).ToList();
}
I use this in a 3.5 projects, but now I'm adding new functionality to an old project that I cannot (at this time) upgrade to 3.5.
I just did this:
[DataObjectMethod(DataObjectMethodType.Select)]
public IEnumerable<OperatorField> FindByType(String type)
{
// return only selected type
//return (from ce in this.OperatorFields where ce.Type == type select ce).ToList();
List<OperatorField> r = new List<OperatorField>();
foreach (OperatorField f in this.OperatorFields)
if (f.Type == type)
r.Add(f);
return r;
}