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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T21:46:06+00:00 2026-05-14T21:46:06+00:00

Recently someone stated that they thought all Creates should be CreateOrUpdates. Instinctively i thought

  • 0

Recently someone stated that they thought all Creates should be CreateOrUpdates. Instinctively i thought bad, but now I am trying to find out if I have any grounds.

Situation

  interface IService{
    void Create(Object a);
    void Update(Object a);
  }

or

   interface IService{
       void CreateOrUpdate(Object a);
  }

My first thought is if you implemented everything CreateOrUpdate then you have no control if someone accidentally sends you wrong data, or concurrency issues where someone changes a “primary” field right before you call update….

But if you remove those cases, are there any other cons?

  • 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-14T21:46:07+00:00Added an answer on May 14, 2026 at 9:46 pm

    It seems pretty simple to me: if you are concerned about accidental record creation use the two methods. If you aren’t concerned use one.

    And if you don’t know if you should be concerned or not, you arent concerned. Go with one method.

    Maybe that’s overly simplistic, but usually the goal is just to get the data into the database.

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

Sidebar

Related Questions

I started using MPLAB recently, but for someone that works with Eclipse and VS
Recently someone pointed out that my personal site was not working on ipad, because
I understand that this question may seem somewhat ungrounded, but if someone knows anything
I've recently started creating a WPF application, and am just hoping that someone can
I've recently taken over a MVVM project started by someone who's now left the
Someone recently asked me this question and I thought I'd post it on Stack
Someone recently taught me a useful thing: in css you can write the following:
I recently saw someone with a T-shirt with some Perl code on the back.
Recently I have heard the bellow statement. Can someone please elaborate on it? With
I recently posted a question using a lambda function and in a reply someone

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.