Best Practices for LLBLGen Pro

Filtering & Predicates



  • 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.


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 3:53 AM by rdhatch, version 32


No comments yet.