Finds a single Entity by its id.
Namespace:
Mindscape.LightSpeed.ServiceModelAssembly: Mindscape.LightSpeed.ServiceModel (in Mindscape.LightSpeed.ServiceModel.dll)
Version: 4.0.0.0 (4.0.0.0)
Syntax
C# |
---|
public TEntity FindById<TEntity>( Object id ) where TEntity : Entity |
Visual Basic (Declaration) |
---|
Public Function FindById(Of TEntity As Entity) ( _ id As Object _ ) As TEntity |
Parameters
- id
- Type: System..::.Object
The id of the Entity
Type Parameters
- TEntity
- The type of Entity to find.
Return Value
An Entity, or null if no Entity was found with the specified id value.
Examples

int customerId = Int32.Parse(Request.QueryString["id"]); Customer customer = unitOfWork.FindById<Customer>(customerId);