Validation after getting EntityCollection

Posts   
 
    
Posts: 5
Joined: 20-Sep-2010
# Posted on: 20-Sep-2010 14:23:39   

Hi all,

were using LLBLGen Validation with Dependency Injection.

When we're getting an entity collection, the Validator checks every entity of this entity collection, wheather it is valid or not. => ValidateFieldValue

Why? We need this method to mark the textboxes (SetEntityFieldError) with the exclamation mark.

Who can help me? :-)

Best regards.

David Mueller

Posts: 5
Joined: 20-Sep-2010
# Posted on: 20-Sep-2010 14:25:41   

We're using LLBLGen 3.0, Microsoft Visual Studio 2010 and .NET Framework 4.0.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 20-Sep-2010 16:35:53   

I'm sorry but I can't find out what's the issue that you are facing.

Posts: 5
Joined: 20-Sep-2010
# Posted on: 21-Sep-2010 08:21:29   

The problem is, that the validator validates each Entity when u request an entitycollection.

  1. Start the program
  2. Getting entity collection 2.1. Each entity in this entity collection will be validated by the Validator in DAL before i receive the entity collection

It's very slow to get nearly 3.000 entities.

I hope you can understand now.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 21-Sep-2010 08:41:13   

The alternative is to disable DI, and call ValidateEntity() on the entity being displayed.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39903
Joined: 17-Aug-2003
# Posted on: 21-Sep-2010 09:45:39   

The validation method is called from the generic validation method which is called when a field is set through the properties.

When you fetch a collection, fields aren't set through the properties, so the validation call is coming from somewhere else. Could you place a breakpoint in the validation method in the validator and check the call stack in vs.net where the call originates from?

Frans Bouma | Lead developer LLBLGen Pro