Fluent API with view model classes

417 views Asked by At

I kinda answered my previous question about data annotations. I have discovered the wonderful world of Fluent API.

I am wondering how this works when you have view model classes though - I am using view model classes in my application and copying the results of posts into model classes that are tracked by EF. How do I tie the data validation performed by Fluent API to my view model classes?

1

There are 1 answers

0
Dirty Coder On

You can't do it with Fluent API. Fluent API is used for mapping relations between objects. Try to search web for Fluent Validation.