c# - Entity Framework DDD using partial class -persistance ignorance -testability -


i want use entity framework , autogenerated classes in application.

i'm not interested on:

  • persistance ignorance
  • testing

i care 1 thing:

  • keep application organized
  • keep things simple

i read domain drive design , i'm interested on because claim simplify complex applications. when read code real application example shocked complexity of approach.

my idea use partial classes extend classes generated ef. ther try approach , can give me advice?

so, if understand correctly, hoping use data access tool, entity framework in particular, implement application.

it sounds not in fact interested in doing domain driven design project.

i think that's fine position in. ddd incorporates ideas , patterns , tools useful outside of ddd.

however, others, caution going half way down ddd road. true concept of domain model. once begin attempting implement true domain model, practically need rest of pieces of ddd in order make work you. find without pieces of ddd puzzle, application move towards anemic domain anti-pattern.

however, if go knowledge not doing ddd, lifting ideas it, can drive right "anemic domain model," , thing.

i'll surprised if don't downvoted saying that, let me explain.

you can take orm (ef), take concept of repository (though prefer call dao - data access object - avoid confusion between two), , implement application using standard layered/onion architecture. bulk of application logic go services implemented in transaction script style using data classes directly reflect database.

this time-tested way build application. not ddd. 2 methodologies fit different types of better, have different pros , cons, etc.

using ef or similar tool should make implementing large parts of application simple , quick. don't bogged down trying ddd when you're not doing ddd.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

html - Instapaper-like algorithm -

c# - How to execute a particular part of code asynchronously in a class -