quentinjs wrote:
I've looked into the "Validator" and its mentioned its a property.
I found another example
[DependencyInjectionInfo(typeof(EmployeeEntity), "AuthorizerToUse",
ContextType = DependencyInjectionContextType.Singleton)]
And in this its "AuthorizerToUse" - in all examples I've seen, this property doesn't seem to be used, is there a special way that its being used?
That is for Authorization.
quentinjs wrote:
What confused me further is the validation example you have on the web site.
The example uses:
namespace SD.LLBLGen.Pro.Examples.Validators
and [DependencyInjectionInfo(typeof(OrderEntity), "Validator")]
and in that example, I didn't see any reference to "Validator" either.
Ok. I will explain a little bit this:
namespace SD.LLBLGen.Pro.Examples.Validators
This is just the namespace under which we write the OrderValidator.
[DependencyInjectionInfo(typeof(OrderEntity), "Validator")]
This means: inject this **OrderValidator **on the property Validator of the **OrderEntity **instances. So, "Validator" is the name of the entity property that represents the validator that will be used.
quentinjs wrote:
Then what confuses me further is in the config file within the dependencyinjection section:
<assembly filename="SD.LLBLGen.Pro.Examples.[b]Validation.[/b]Validators.dll"/>
This is not part of the name space, and doesn't match the "Validator" property either. So is this a problem in the example program? Or a problem in my understanding?
That line represents the name of the assembly where the validator classes reside. If you right-click on the SD.LLBLGen.Pro.Examples.Validators project and click Properties you will see that that line corresponds to the assembly file name.
quentinjs wrote:
So I have a partial class
namespace glossary.Validators
{
[DependencyInjectionInfo(typeof(GroupEntity), "Validator")]
.
.
.
}
otherwise my class is the same as this example as I copied it and made changes.
In the config file I used:
<assembly filename="Glossary.Validators.dll"/>
is this case sensitive?
What is the exact name of the assembly. Look at the project properties of the project where those validators reside.
At first I didn't understand you (your first post). Do you have problems with validator or auditor. I think it's auditors right? Now seems like your real problem is that the assemblies didn't get loaded.
(Edit)
I downloaded and tested the Validator example and it works as expected.