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 8025953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T23:19:56+00:00 2026-06-04T23:19:56+00:00

My question is in regard to the first M in MVVM, the model. I

  • 0

My question is in regard to the first “M” in MVVM, the model. I see a ton of variations on how to implement the model. Some are just POCO’s with no business logic and no persistence logic, and others contain one or both.

Right now, in our application, we have a decent separation between models, views, and view-models. This is our current solution structure (its a WPF prism application):

  • Infrastructure
  • Module A
    • ViewModels
    • Views
  • Module B
    • ViewModels
    • Views
  • Models (shared amongst modules, which is why its in its own class library)
  • Services
  • DataAccess (possibly utilizing dapper-dot-net)
  • Shell (main WPF project)

We now need to figure out how to perform our CRUD against the database and keep our models updated. I like the idea of keeping the models pretty bare-bones and having a “Services” class library that contains our business logic and performs a unit of work pattern against our data access classes. Are there any known issues with keeping the models dumb and ignorant of business logic / data access? Is this pretty uncommon to do in MVVM?

I wonder if I’m limiting myself or making things more complex than they need to be by not placing some logic in the models, for example, loading a model from within its ctor given an argument. As a note, this will be a large application.

Our application will have to persist models to multiple databases. We’re using Unity as our dependency injection container for our services. How would you recommend I tell the service which data connection to use? Ctor, per function, etc?

Kinda looking for someone who built a similar structure, and what their experiences were / recommendations are.

  • 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-04T23:19:57+00:00Added an answer on June 4, 2026 at 11:19 pm

    In my view, MVVM models just ‘represent’ the data and should therefore not have any logic, CRUD or otherwise embedded. You already have the Data Access Layer so it is perfectly normal to write your CRUD code there and to use DI to access this CRUD code from your models.

    The “beauty” of MVVM is that it is open to interpretation so I’m sure someone else would argue that model IS the data and it can containt CRUD logic…

    I have all my CRUD operations in my DAL and am yet to see the downside of that approach…

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

Sidebar

Related Questions

My question is in regard to the SelectComman in the <asp:SqlDataSource ID=SqlDataSource2 runat=server ConnectionString=<%$
My question is in regard to the way Java handles String literals. It's quite
I have few question in this regard When you create an internet page, does
I have a question about arithmetic behaviour in R. Regard the following piece of
First, I'm sorry for the question title but I can't think of a better
My question is very simple. I will ask it first in case the answer
first question here, so hopefully you'll all go gently on me! I've been reading
First of all excuse me for my english. This is my first question here.
My first question here, hopefully I'm not doing it wrong. My problem is that
The following question is more complex than it may first seem. Assume that I've

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.