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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T02:31:24+00:00 2026-06-09T02:31:24+00:00

We develop the back office application with quite large Db. It’s not reasonable to

  • 0

We develop the back office application with quite large Db.
It’s not reasonable to load everything from DB to memory so when model’s proprties are requested we read from DB (via EF)
But many of our UIs are just simple lists of entities with some (!) properties presented to the user.
For example, we just want to show Id, Title and Name.
And later when user select the item and want to perform some actions the whole object is needed. Now we have list of items stored in memory.
Some properties contain large textst, images or other data.
EF works with entities and reading a bunch of large objects degrades performance notably.

As far as I understand, the problem can be solved by creating lightweight entities and using them in appropriate context.

First.
I’m afraid that each view will make us create new LightweightEntity and we eventually will end with bloated object context.

Second. As the Model wraps EF we need to provide methods for various entities.

Third. ViewModels communicate and pass entities to each other.

So I’m stuck with all these considerations and need good architectural design advice.
Any ideas?

  • 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-09T02:31:26+00:00Added an answer on June 9, 2026 at 2:31 am

    For images an large textst you may consider table splitting, which is commonly used to split a table in a lightweight entity and a “heavy” entity.

    But I think what you call lightweight “entities” are data transfer objects (DTO’s). These are not supplied by the context (so it won’t get bloated) but by projection from entities, which is done in a repository or service.

    For projection you can use AutoMapper, especially its newer feature that I describe here. This allows you to reduce the number of methods you need to provide “for various entities” (DTO’s), because the type to project to can be given in a generic type parameter.

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

Sidebar

Related Questions

I'm building an HTML5 application (with ASP.NET back-end) and i want to develop it
I develop an application, which allows user to choose wallpaper from gallery and set
I'm trying to develop a simple mxml Flex application to start Skype from the
I am trying to develop a back-end Ad Checking application in PHP. We have
I am trying to develop an application in which I use bump API. Everything
I develop application for APNS. My code is work fine with one device and
I develop one book reader application which play audio according to page, but problem
I develop a Java application with 4 tiers : database (MySQL), persistence (JPA), business
I develop a simple Spring application which is my university task. There are 3
I got into a discussion a while back. The company I work at develop

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.