| Visual Basic (Declaration) | |
|---|---|
Public Class ObjectSearcher(Of T) | |
| Visual Basic (Usage) | |
|---|---|
| |
| C# | |
|---|---|
public class ObjectSearcher<T> | |
| Managed Extensions for C++ | |
|---|---|
public __gc class ObjectSearcher<T> | |
| C++/CLI | |
|---|---|
generic<typename T> public ref class ObjectSearcher | |
- T
| C# | |
|---|---|
[Persistent("USER")] | |
| C# | |
|---|---|
// UserSearcher is a specialized class that searches only for user objects. | |
This class is specialized to load objects from the storage. The implementation is gerneric: once created it allows you to load only objects of the generic type. Usually the generic ObjectSearcher class is created by using the GetObjectSearcher function of the ObjectContext. ObjectSearcher contains a few methods (for example: FindAll) to search for objects.
FindAll returns an instance of the ObjectSet class. This class contains the result of the search. FindAll has been overloaded to return also a class that implements the IList interface with the resultset.
The ObjectSearcher should be also used to encapsulate complex queries. If you have a complex SQL statement you should derive from ObjectSearcher and create your own "Searcher" class. To create your own "Searcher" classes derive directly from ObjectSearcher and extend it with your own methods (For further information see the example below).
System.Object
Chili.Opf3.ObjectSearcher
Requirements
Namespace: Chili.Opf3
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
Assembly: Chili.Opf3 (in Chili.Opf3.dll)