枚举和3层 [英] Enumerations and 3 tier

查看:106
本文介绍了枚举和3层的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在vb.net中有关在单独的3层解决方案中定义枚举的位置的任何建议吗?

我想用3层作为单独的项目来制定解决方案:
数据逻辑
业务逻辑
表示逻辑

在此解决方案中,我将需要用于所有3个项目的枚举,但我不希望
引用表示项目中的数据逻辑或业务逻辑中的表示逻辑.

你们如何解决这个问题?

Arwin van der Laan

Any suggestions as to the place to define your enums in a seperated 3 tier solution in vb.net ?

I want to make a solution with the 3 tiers as seperate projects:
data logic
business logic
presentation logic

within this solution i will need enumerations that are used through all 3 projects but I don''t want
to reference the data logic from the presentation project or the presentation logic from the business logic.

How do you guys solve this ?

Arwin van der Laan

推荐答案

有一个包含这些枚举的dll.
使三层中的所有类(需要这些枚举)都引用此dll.

这可能是一种方法.
Have a dll that includes these enums.
Make all classes (that need these enums) in the three layers reference this dll.

This could be one way.


这篇关于枚举和3层的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆