I am trying to learn MVC using ASP.NET MVC3. Most of the tutorials I referred are using Entity Framework. In my case , I will be using WCF services for model. I have the following questions (when I am using WCF)
- If I am using DataAnnotation for validation, where the validation should be? Is it inside the WCF service?
- Is Entity’s used in WCF service be passed as model to view?
Could you please point me to some good MVC3 articles/tutorials that uses WCF and addresses my questions? It would be great if those articles has code demonstrations also.
READINGS:
I would strongly recommend against adding
DataAnnotationtags on your WCF service.Rather use a separate view model that is populated from a service/controller that executes your WCF services.
There are two separate concerns here: