Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6863117
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:44:36+00:00 2026-05-27T02:44:36+00:00

I have a solution composed of several layers: controller > service > business >

  • 0

I have a solution composed of several layers: controller > service > business > repository

I’m learning MVC so I try as much as possible to follow best practices. I think the controller must be as light as possible. Let’s say we have an Edit action in my controller receiving a view model posted by the corresponding view. This view model is a substract of data contained in a model object.

What I have to achieve with this view model:

  • (1) retrieve the associated object model
  • (2) map my view model into my object model (in order to have an updated and complete object)
  • (3) save this updated object
  • (4) prepare a notification to be displayed in the view
  • (5) return to another view

My question: where do I have to code all these things?

In my point of view, the points 1, 2, 3 must be done in a business layer and the points 4 and 5 in the controller layer.

Can you confirm?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T02:44:37+00:00Added an answer on May 27, 2026 at 2:44 am
    • Repository has data access logic.
    • Business layer will use repository to persist the object
    • Business layer will check business rules, send emails, etc. Most logic goes here.
    • Controller just uses the Business layer to perform the functionality.

    Service class is what I refer to as a Business layer. If you mean a Web Service by that then the class representing the web service should internally be dispatching calls to your actual Business class otherwise you don’t need an intermediate Service class between your Business and Controller.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a solution with several projects. One of them is a setup project.
I have a solution with several projects, where the startup project has a post-build
I have a website solution that is composed of a Silverlight Project and an
I have a MEF based solution that has several exported implementations of an interface.
I have an ASP.NET MVC site which is composed of 3 projects in a
My solution is composed of several Class Library projects. One of these include a
My scenario is this. I have a single entity composed of several rows in
I have a c# solution and its composed of numerous projects. I have a
I have a C# solution composed of three projects in Visual Sudio 2010. One
Currently I have solution A that contains a domain layer base and solution B

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.