Hello,
Thank you for reading my posting. We have a Silverlight 4 RIA application that uses LLBLGEN for its data access layer. My question is not directly about LLBLGEN, but I hope that another forum member of LLBLGEN may have encountered this problem and may have some advice.
We've implemented a custom RIA validator to ensure that a customer's name is not duplicated in the Customers table. Our implementation is based on Jeff Handley's posting at http://jeffhandley.com/archive/2010/05/26/asyncvalidation-again.aspx. Everything was going well and compiled until I added the custom validator to our CustomerEntity. Now, the CustomerEntity will not compile because the custom validator is undefined. I understand why it is complaining, but I am totally lost as to how to fix it. I hope that someone can help be find my way again!
Here are the relevant references between the projects in our our solution:
CLIENT (Silverlight)
- customervalidator.shared.cs (via shared mechanism)
WEB (Server)
| - customervalidator.shared.cs exists here.
| - mydomainservice.cs exists here. It contains the IsCustomerNameAvailable custom validator method.
|
| (references)
|
v
DAL (LLBLGEN data access layer, contains our model entities)
- CustomerEntity.cs contains our RIA custom validator tag the on the Customer.Name field.
[CustomValidation(typeof(CustomerNameValidator), "IsCustomerNameAvailable")]
ISSUE: The custom validator is available on the CLIENT and WEB (server), but the entity code in the DAL has no access to it. If I could add a reference from the DAL to the WEB project, a circular reference would result. So, I am at a loss how to fix it... I would truly appreciate your comments about how to correct my situation. I found a few people with similar postings, but, alas, no responses...
Thank you for your time and interest,
Mike