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

  • Home
  • SEARCH
  • 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 7965369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T06:08:10+00:00 2026-06-04T06:08:10+00:00

I ran some searches but found no available answer to this issue. Okay, my

  • 0

I ran some searches but found no available answer to this issue.

Okay, my MVC 3 architecture is like this:

- Project.EDM (contains only the entity framework edmx file and its .tt and .cs entity classes)
- Project.DAL (contains IXxxRepositiory and XxxRepository where CRUD is performed on the entity classes)
- Project.Web (the MVC3 project. Controllers transfer data from ViewModels into entity models and call the CRUD functions in the DAL repositories.)

The WebApi in MVC4 appears so attractive since we will be able to call the CRUD operations from other applications. We all love this idea.

But the existing examples I have found have the CRUD operations inside the MVC4 project under ApiController. I am used to putting these operations into a separate DAL project. What is the recommended choice? Can we still have a separate DAL class? How do you experts design the architecture?

Thank you for all helpful advice.

  • 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-06-04T06:08:12+00:00Added an answer on June 4, 2026 at 6:08 am

    What I do is this:

    • Repository to query the database
      • Service layer to validate stuff and to avoid code duplication
        • Web UI
        • Web API

    So both the UI and the API will have one or multiple services, that in turn have one or multiple repository objects.

    The only reason why most examples directly query the database from the ApiController is probably because of simplicity.

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

Sidebar

Related Questions

I stumbled across this article and found it very interesting, so I ran some
I ran some code like this (defun writeFile (name content) (with-open-file (stream name :direction
I ran across some routes that followed this format: resources :foobar, except: create I
Recently while trying to answer a questions here, I ran some test code to
I recently ran some of my ASP pages through HTML Tidy validation and found
I've been asking questions on here for some time, but this will be my
i keep getting NullPointerException on this line: SharedPreferences myPreference = PreferenceManager.getDefaultSharedPreferences(this); i ran some
I ran some code through an automatic translator for C# to VB, and it
I ran some CUDA code that updated an array of floats. I have a
I ran into some trouble while creating a C-Extension for ruby that got me

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.