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

The Archive Base Latest Questions

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

I just asked myself is it really needed to pass the whole List SelectedCustomers

  • 0

I just asked myself is it really needed to pass the whole List SelectedCustomers to the delete method of the Repository like:

_customerRepo.DeleteCustomers(SelectedCustomers);

Would it not be better to pass just the Id`s of the customers to be deleted like

List<int> SelectedCustomerIDs = GetSelectedCustomersIDs(SelectedCustomers);
_customerRepo.DeleteCustomers(SelectedCustomerIDs);

I am not using an ORMapper which surely accepts only full entities to acceptchanges on or to remove it from the context.

I am using sqlite so I thought passing a List of int values is faster/less Ram than passing a List of entities.

What do you think?

  • 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-18T02:09:36+00:00Added an answer on May 18, 2026 at 2:09 am

    The objects are already in memory and you are not copying them when passing them to the repository, but only the references to them. So, you will not be saving on memory (unless your repository is on a different server).

    So long as in your repository you are just using the IDs to pass to the database, you should be fine.

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

Sidebar

Related Questions

Filters like img {filter:flipV;} I'm guessing are pretty old, I just was asked by
I just started working on a huge gwt project and asked myself if there
While coding, i just asked myself this question : Is this faster : if(false)
I've been using Core Data for a while, but I just asked myself a
Just asked a question about linking Boost libraries in the make file. Thanks to
Just asked how to check if an internet connection exists using javascript and got
I just asked a question earlier today because I wanted to run an executable
I've just asked a question about an hour ago, while waiting for replies, I've
yesterday I just asked following question. How to customize tableView Section View - iPhone
I have just asked this question an hour ago but with regards to IE8

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.