Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7076815
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:20:40+00:00 2026-05-28T06:20:40+00:00

I prefer working with Fluent API configuration to DataAnnotation because I want to separate

  • 0

I prefer working with Fluent API configuration to DataAnnotation because I want to separate model from data access.

I have tried in MVC, Fluent API does not work with client side validation. Shortly speaking, is there a simple way to make Fluent API works with client side validation as DataAnnotation can do?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T06:20:40+00:00Added an answer on May 28, 2026 at 6:20 am

    No. Fluent API is just mapping – correct. Data annotations are both mapping and validation – wrong. Data annotations are one of the worst features of EF code first because when used this way they couple persistence with presentation and validation logic.

    Advice: don’t use EF entities for presentation. Use special view models with data annotations and let your controller prepare view models from entities and vice-versa. Soon or later you will find situations where your validation is not 1:1 with your mapping or where your view needs more or less data than provided in entity type. Use view models and these situations will be handled by them.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

gsub('$0\n','') isn't working I would prefer something similar. I want: (note the 10 and
In some instances, I prefer working with custom objects instead of strongly typed datasets
I prefer to use OOP in large scale projects like the one I'm working
i prefer jquery. let's say i have a string with , adam, lisa, john,
I prefer to have the exception handling logic further up in the call stack,
I'm working on an LGPL game engine library and I prefer to code without
I am working in an Agile environment and things have gone to the state
When working on small projects or some test classes , I would prefer to
Currently we are working on ASP .net application and i would prefer to go
I am trying to implement a decorator chain for my data-access based on IRepository.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.