| DataContextSingleOrDefaultTModel Method |
Returns only if only one result is available
Namespace:
SanteDB.OrmLite
Assembly:
SanteDB.OrmLite (in SanteDB.OrmLite.dll) Version: 2.2.1
Syntax public TModel SingleOrDefault<TModel>(
Expression<Func<TModel, bool>> querySpec
)
Public Function SingleOrDefault(Of TModel) (
querySpec As Expression(Of Func(Of TModel, Boolean))
) As TModel
public:
generic<typename TModel>
TModel SingleOrDefault(
Expression<Func<TModel, bool>^>^ querySpec
)
member SingleOrDefault :
querySpec : Expression<Func<'TModel, bool>> -> 'TModel
Parameters
- querySpec
- Type: System.Linq.ExpressionsExpressionFuncTModel, Boolean
[Missing <param name="querySpec"/> documentation for "M:SanteDB.OrmLite.DataContext.SingleOrDefault``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}})"]
Type Parameters
- TModel
[Missing <typeparam name="TModel"/> documentation for "M:SanteDB.OrmLite.DataContext.SingleOrDefault``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}})"]
Return Value
Type:
TModel[Missing <returns> documentation for "M:SanteDB.OrmLite.DataContext.SingleOrDefault``1(System.Linq.Expressions.Expression{System.Func{``0,System.Boolean}})"]
See Also