简体   繁体   English

解决方案中的哪里放置Emailer类?

[英]Where to place the Emailer class in the solution?

I have a solution that has the following structure: 我有一个具有以下结构的解决方案:

- My Solution
-- Core
--- Core.Interfaces (DLL)
--- Core.Data (DLL)
--- Core.Business (DLL)
-- Models
--- Models.Enums (DLL)
--- Models.DTOs (DLL)
--- Models.Model (DLL)
-- Clients
--- Client Access (ASP.NET MVC)
--- Management Access (ASP.NET)

Now I have an emailer class (IEmailer and Emailer) that will be used in both clients and mainly in the Core.Business as well, my initial thought is to place it in the Core.Business project. 现在,我有一个电子邮件程序类(IEmailer和Emailer),这两个客户端都将使用它,并且主要在Core.Business中使用,我最初的想法是将其放置在Core.Business项目中。

Is that the logical place for the emailer class? 那是电子邮件程序类的合理位置吗?

I would add IEmailer to the Core.Interfaces and Emailer to a new assembly, something like Infrastructure.Services . 我将IEmailer添加到Core.Interfaces并将Emailer添加到新的程序集,例如Infrastructure.Services There isn't much benefit in having the interface and implementation in the same assembly. 在同一程序集中具有接口和实现并没有太大的好处。

Next, I would assure that Core.Business has no direct dependency on the Infrastructure.Services assembly, hence on the Emailer type. 接下来,我将确保Core.Business不直接依赖于Infrastructure.Services程序集,因此不依赖于Emailer类型。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 标准的电子邮件类? - Standard emailer class? 在我们的解决方案中将实体框架放在何处? - Where to place the entity framework in our solution? 初始化 class 属性的最佳位置在哪里? [等候接听] - Where is the best place to initialize a class property? [on hold] 通用抽象类概念中的何处放置对象? - Where to place objects in an generic abstract class concept? ASP.NET Core:应将上传的图像放在哪里,应在解决方案之间共享? - ASP.NET Core: Where to place uploaded images, which should be shared across solution? log4net:在哪里放置静态 LogManger 对象? (在解决方案的不同项目中使用它,每个项目都有一个单独的配置文件) - log4net: Where to place static LogManger object? (using it in different projects of a solution, each having an individual config-file) 如何访问 xamarin.android 中的文件。 还有在 Visual Studio 解决方案资源管理器中,我应该将文件放在哪里以便在我的代码中找到它 - how to access files in xamarin.android. And also in Visual Studio Solution explorer where should i place the file in order to locate it in my code 在设定的时间自动发送电子邮件 - Automated Emailer at a set time 在哪里放置InvokeRepeating? - Where to place InvokeRepeating? 在哪里放置NuGet - Where to place NuGet
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM