Best Practices for LLBLGen Pro

Filtering & Predicates

Cloning

Debugging

  • Watch SQL Output
    • Set LLBLGen Debugging Levels for (specifically, ORMPersistenceExecution and the DQE for your database. ie - SQLServerDQE)
  • Collection Was Modified Error
    • Try disconnecting your EntityCollection from any related entities. Loop through the disconnected EntityCollection.
myCollection.DefaultView.ToEntityCollection

Relations

DynamicLists & Manual Joins

General - For Self-Servicing Projects:

LazyLoadingWithoutResultReturnsNew = False
This is a must. This will save you many headaches. Instead of returning a New Entity if an Entity cannot be Lazy-Loaded, this flag forces LLBLGen Pro to return Null. It is much easier to debug Null reference exceptions at the point of causation, than it is to trace back through all your code because an entity was automatically created and you didn't expect it. This way, you can also simply test if you have a Related entity or not. This flag is set to True by default, and can cause the new entity to be saved automatically when Saving recursively, which can create SQL errors that are can be difficult to debug & backtrack. Otherwise, certain foreign keys that you expected to be set on the Related entity will not be set, because the entity was new and you didn't know it.

General - For Adapter Projects:

Reference Manuals, Examples, & Further Reading

Last edited May 20, 2009 at 2:53 AM by rdhatch, version 32

Comments

No comments yet.