Domain Layer
class Member
string UserName
interface IMemberRepository
Let's say you want functionality to check if a UserName is in the database already. This logic would have to use a concrete implementation of the IMemberRepository, eg MemberRepositoryNHibernate.
My question is, where and how should this logic be implemented?
The Web Layer?
I think this is wrong because the functionality might be applicable across multiple UI layers.
In a "Service" in the Domain Layer?
If this method is used, how does the service retrieve the concrete implementation of IMemberRepository? Does it retrieve the repository from the IoC container, or should the repository be passed to the service's constructor? Any thoughts on this would be appreciated.
In the Entity itself?
I don't know...is it semantically wrong for the Member class to know about and utilize the IMemberRepository interface?
Here's the context in which I'm asking this question. I would like to have a separate IoC layer so that I could 1. switch containers easily and 2. eliminate references to the Peristence layer from my Web layer.
This IoC layer needs a reference to the Domain Layer, because it needs to know about the interfaces defined in the Domain Layer.
But now the Domain Layer can't use the IoC layer, that would be a circular dependancy. So that got me wondering about how proper that was anyway.
My current understanding is that since the Domain layer can't ask the container for a repository itself, it'll have to be passed in by the Web layer, which requests either the repository or the service from the container.
Much thanks to anyone who is willing to help straighten out my confusion.
Thanks
I wanted to thank you for
This blogs has very
This is a really good read
Thanks for the information. A
rosetta stone
nothing is impossible.
This is nice post which I was
cookware of china
rolex
rolex
i like it. SEO Seo
nice share. hosting web
online pharmacy. cheapest
when you implement your
ALexMYRide
منتديات
فراشة حواء
استضافة
بنات
بنات السعودية
بنت سعودية
مطير
النوادر
يوتيوب
احبك
ميلودي
هوامير
ملوك العرب
لعبة
سمو الحب
ميلاد الحب
ليل الحب
فوركس
بلاك بيري
business directory
تحميل برنامج
مطير
كورة
حواء
بنات
كتاب
business directory
تفسير الاحلام
اسئلة
فلاش
طبخ
العاب بنات جديدة
علاج
اسلامية
نكت مضحكة
دروس
رسائل
ماسنجر
صور
ترددات
شعر
افضل موقع
برنامج
انشودة
قصص
توبيكات
يوتيوب
شات بنات
العاب بنات
اناشيد
ثيمات
بروكسي
ترجمة
قناة
بحث
تعارف
القران
معلومات
تحميل
كتب
فيديو
قنوات
شات
معلومات
تفسير الاحلام
للنساء
طبخ
العاب
العاب بنات
احداثيات
هاك
علاج مرض
فلاشات
اسلامية
جافا java
نكت
القران الكريم
دروس
دليل
ماسنجر
صور
بروكسي proxy
قصص
تردد قناة
سكربت
بحث
شعر
ايقونات
رسائل
برنامج
اناشيد
طلاب
روابط
ترجمة
خريطة
تصميم
directory
خطوط
الاسرة
بطاقات
جوال
اخبار
ستايل
قبائل
تحميل
شات صوتي
يوتيوب
بنات
تعارف
توبيكات
سوال وجواب
ALexMYRide
pandora jewelry
Programming is not so easy.
Five Finger Shoes
Cheap UGG
There are many programming
There are many programming languages available and each of them is suitable for another program or application. There are people who have learnt only a few programming languages and who use these because that is what they know, bust most of the times software programmers will use the programming language that is required by the application they are creating.
captive insurance domiciles
Jordan Shoes
wedding
This IoC layer needs a
nice share. SEO Seo
i like it. hosting web
online pharmacy. cheapest
ティファニー 激安
エアマックス 通販
コピーブランド腕時計
mbt シューズ
the Domain Layer can't use
Domain layers usage will be
cheap nfl jerseys
result in a palace on cheap nfl jerseys 11, 1996 in the operation wound was cheap nfl jerseys noodles machines disabled. Though not widespread wholesale nfl jerseys of child labor state-owned football jerseys, but it is an objective reality; second part nfl football jerseys the private enterprises are making profits, the nfl jersey as easy to manage, high residual cheap jerseys of cheap labor, a large number of illegal employment of child labor, poor working environment for a throwback nfl jerseys time heavy labor.
serious harm to the child's physical and mental health. The evening of 30 May 2001,nike air jordan
gucci men shoes
Good
I do not like to use the web layers, more complex and difficult to apply. sometimes even make an error on the web.
classified ads | employment | adjustable beds
Great Information
Thanks for the awesome post.
Love Quotes
pet totes
rubber moulding
hip hop forum
caddis dog beds
Watch Friends online
Layer calling the Repository interface
Hi,
First some context: any application I develop has four mayor layers: UI, Application, Domain and infrastructure. The application layer is responsible for the "orchestration" of domain layer calls. The domain layer of course contains the actual operations and state as expressed by the ubiquitous language.
Since the application layer is responsible for orchestrating calls to the domain objects, it will first have to obtain a reference to them. The only way to do that is by calling the Repository implementation (through the interface, of course).
That's the way I do it in projects, and I find it useful. I hope it helps you too.