DatabaseConnectionTryFindT Method |
Tries to find an object in the database with the provided primary key.
Namespace: SQLitePCL.pretty.OrmAssembly: SQLitePCL.pretty.Orm (in SQLitePCL.pretty.Orm.dll) Version: 1.0.0.0 (1.0.0)
Syntax public static bool TryFind<T>(
this IDatabaseConnection This,
long primaryKey,
Func<IReadOnlyList<IResultSetValue>, T> resultSelector,
out T value
)
[<ExtensionAttribute>]
static member TryFind :
This : IDatabaseConnection *
primaryKey : int64 *
resultSelector : Func<IReadOnlyList<IResultSetValue>, 'T> *
value : 'T byref -> bool
Parameters
- This
- Type: SQLitePCL.prettyIDatabaseConnection
The database connection. - primaryKey
- Type: SystemInt64
A primary key. - resultSelector
- Type: SystemFuncIReadOnlyListIResultSetValue, T
A transform function to apply to each row. - value
- Type: T
If found in the database, the found object.
Type Parameters
- T
- The mapped type.
Return Value
Type:
Booleantrue, if an object was found,
false otherwise.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IDatabaseConnection. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also