提供者与服务类别 [英] Provider vs services class

查看:165
本文介绍了提供者与服务类别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我有点与提供程序和服务混淆了,我看到一些将CRUD放在提供程序和服务文件夹/类中的地方.提供者和服务有什么区别?在此先感谢大家:)

我尝试过的事情:

我尝试将数据库CRUD放在Services文件夹/类(如Services/DataService.cs)中,这是最佳实践吗?启发我伙计们

Hi guys I''m little bit confuse with provider and service i saw some putting there CRUD in providers and services folder/class. What is the difference with provider and services? Thanks in advance guys :)

What I have tried:

I tried putting database CRUD in services folder/class like Services/DataService.cs is it best practice? enlighten me guys

推荐答案

这是一篇有趣的文章,可以帮助您入门,它讨论了诸如三层"体系结构之类的事情:
逐步了解项目的C#设计模式–部分1 [ ^ ]
这是有关提供者模式的文章:初学者的提供者模式 [ ^ ]
以及有关服务模式的一些信息:服务模式 [
Here is an interesting article to get you started, it discusses things like "three tier" architecture:
Learn C# Design patterns step by step with a project – Part 1[^]
Here is an article about the Provider pattern: Provider Pattern for Beginners[^]
And some info about Services patterns: Services Patterns[^]


这篇关于提供者与服务类别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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