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 1067899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T20:13:01+00:00 2026-05-16T20:13:01+00:00

I started a project to see what EF 4 can do with POCOs. I

  • 0

I started a project to see what EF 4 can do with POCOs. I created a db and a custom POCO. Now i want to validate my data. For this i’m using the Enterprise Library Validation Block 5.

I have no problem including the validation in my POCOs through attributes and using it with Entity Framework but this means that my POCOs wouldn’t be POCOs anymore because i inserted the dependency to the Validation framework.

Any advice where should i insert the validation part and keep the POCOs clean?

  • 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-16T20:13:01+00:00Added an answer on May 16, 2026 at 8:13 pm

    I agree that you would like to keep your entities free from validation. It is not the responsibility (SRP) of the domain object itself.

    Besides attribute based validation, the Enterprise Library Validation Application Block (VAB) also supports configuration based validation. There are two models you can follow here:

    1. Use XML based configuration. This is well supported. The VAB contains a configuration tool that allows you to configure the whole thing without writing a single line of XML. Especially the 5.0 tool is very good. Still, using XML makes it hard to refactor anything in your model (however, unit tests will help you spot error sooner).

    2. Using code based configuration. While I personally like this model, because it can do a much better job in making your domain easy to refactor. You can get it to work, but it isn’t a well supported yet. You can look at this thread to see an example of how to code based configuration and what the current short comes are.

    Good luck.

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

Sidebar

Related Questions

If you go to this website, http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/intro-to-aspnet-mvc-3 , you can see a tutorial where
I've recently started getting into Git on a personal project, and I can see
I have a recently started project where i'm using mongoid for the database and
I started my project in Asp.net MVC(c#) & SQL Server 2005.I want to implement
I have started a project from an XCode template I have created. When I
At work, we recently started a project using CouchDB (a document-oriented database). I've been
I am trying to convert my model-first project to code-first, as I can see
I started a different thread for this, I tried solving it using the help
I started to use Dashcode with a Safari Custom Project, my apps work fine,
I've recently started exploring using AJAX for a small project, and I've had reasonable

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.