Wade wrote:
So is there an exception thrown if it does not exist? Or a boolean returned?
Also on the filter do I have to create a Index or Constraint on the Rolename column to do the ConstructFilter..... ?
Wade
I would suggest taking a look at the documents. From the LLBLGenProRefrenceManual
DataAccessAdapterBase.FetchEntity Method
Fetches an entity from the persistent storage into the passed in Entity2 object using a primary key filter. The primary key fields of the entity passed in have to have the primary key values. (Example: CustomerID has to have a value, when you want to fetch a CustomerEntity from the persistent storage into the passed in object)
[Visual Basic]
Overridable Public Function FetchEntity( _
ByVal entityToFetch As IEntity2 _
) As Boolean Implements _
IDataAccessAdapter.FetchEntity
[C#]
public virtual bool FetchEntity(
IEntity2 entityToFetch
);
Parameters
entityToFetch
The entity object in which the fetched entity data will be stored. The primary key fields have to have a value.
Return Value
true if the Fetch was succesful, false otherwise
Implements
IDataAccessAdapter.FetchEntity
Remarks
Will use a current transaction if a transaction is in progress, so MVCC or other concurrency scheme used by the database can be utilized
See Also
DataAccessAdapterBase Class | SD.LLBLGen.Pro.ORMSupportClasses Namespace