c# - How to write three layers in the model in mvc project
高洛峰
高洛峰 2017-05-16 17:05:52
0
8
556

It is to integrate the other three layers in the project into the model

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all(8)
某草草

I personally think that if you need to extract the original business logic code or the complex business logic code to be implemented separately into a class library.
MVC mainly solves the separation of view, model and user control. In actual business scenarios, it may involve more complex logical processing, such as multi-table joint query, transaction process processing, etc. These complex, relatively independent, view-independent business logic codes can be extracted into separate class libraries to provide external interfaces. Called through dependency injection or direct reference in MVC. The M in MVC just plays the role of a domain model, which may be better.

某草草

When I saw this question being asked, I wanted to say: "Idiot, idiot, what kind of JB question are you asking?" However, after thinking about it, I feel that no matter what, I should be tolerant. Here, I want to ask You, what is the business logic or foundation you are based on? Why do this? What do you think are the benefits of doing this? From this, we can analyze and answer your thoughts. Otherwise, most people don’t want to answer questions without context, especially those who work in technology. They often want to get a reason, and they will naturally think it is unreasonable. I'll scold you. Alas, let’s not talk about the following. Let me mention one thing here. If the other three layers are put into the model, it will not be called model, and it will not be called MVC. As for the situation, I can’t describe it.

滿天的星座

Haha, I guess the poster has a problem with his expression skills

漂亮男人

Integrate the other three layers in the project into the model. What’s the point of layering this way

小葫芦

It’s unscientific to do this. MVC is to separate the others.

大家讲道理

Oh, if you do this, you don’t need to layer it. Why do you still need MVC...

phpcn_u1582

You are an alien. . . .

2B, you still ignore it, can you ask clearly?

Peter_Zhu

You can understand the concept of mvc

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template