English 中文(简体)
领域驱动设计和实体框架4.1(代码一)
原标题:Domain Driven Design and Entity Framework 4.1 (code-first)

我目前正在学习发展领域驱动的设计方法,并利用这一方法。 NET territorial Driven Design with C# book by Tim McCarthy as a Guide.

这本书确实有帮助,但在使用实体框架,特别是第4.1条的现有代码第一方法时,我会变得微不足道。

根据该书的例子,分层建筑方法应当意味着基础设施层面可以看模/主干。

因此,在(我假定)在基础设施层面坐在不违反分层办法的情况下,如何最妥善地绘制我国域名图?

我的思维完全错了,因此,请允许我知道,我仍然学习!

Many thanks :)

Adam

最佳回答

如今,像EF4.1和Nhibernate(fluent Nhibenrate Addon)一样,大多数办公室管理层可以通过绘图班来描述从POCO到Db环境的地图。 这些制图班最好放在基础设施数据库项目上,可能与人力厅会议的具体班级合并。

Then your POCO domain classes should be placed in a Domain project that shouldn t have any references to other components or projects. BUT the infrastructural database project should reference the domain so that your mapping classes can descibe how POCO s should be loaded from a persisted state.

Use a lot of Dependency injection together with a good and solid IoC framework (Windsor Castle...). This will help you to loosen things up a little bit. Its better to depend on an abstraction/interface rather than an implementation.

Here is the basics http://www.infoq.com/articles/ddd-in-practice

但是,你决定采取第一手法。 如果你有选择,我确实建议这样做。 但是,有时旧的遗产制度干扰,事情就很容易。

问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签