Mar 9, 2011 at 9:17 AM
Edited Mar 9, 2011 at 9:18 AM
Hi, I have the same problem after these many years.
I am trying to develop a 3-tier solution on .net 4.0 like this:
Server with WCF and Entity Framework 4
winform and web client
Enterprise library 5.0 validation application block to validate on both server and client side
I found a work around, it works,
but since I am using Entiy Framework and its entities as both model and data contract, its designer rewrites the model everytime the model changes, defining the validation rule in data contract classes will be a pain in the ass!
Using DTO is too time consuming, so we are going to self tracking entities.
I tried to define the validation rule in config file insted of entity classes, it works well on the winform client, but it did not validates anything on the server side with WCF.
Is it supported in Enterprise Library 5.0 to define validation rules in config file and integrate into WCF by validating entities not parameter?
If so, could anybody posts an example?
I tried hard to find some examples like this but without any success.