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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:38:51+00:00 2026-05-27T11:38:51+00:00

I have a list of Games users can join. To select a game ,

  • 0

I have a list of Games users can join. To select a game, they have to pick a position (ie., role) within that game.

Model

[Game] 1 <-> * [PlayerGame] * <-> 0..1 [Player]

The PlayerGame entity defines the picked position by the player.

Other details

  • All the games are listed within a MVC 3 View.
  • Data is persisted within a SQL Server 2008 instance and accessed via EF4 (CodeFirst).
  • The view updates itself via some jQuery Get() calls that pulls up-to-date data each N milliseconds.
  • The higher the delay (N), the bigger the chances of racing conditions, where 2 users would try to pick the same position.
  • I will obviously need to do some server-side validation to allow only one of the 2 users to get the selected position, if they both pick the same position at the same time.

What would be the best way to asses only 1 person gets the selected position while the other gets an error message?

I’m currently thinking about using TimeStamps to make sure only 1 of the 2 calls can successfully update the PlayerGame row. Is that a good idea?

  • 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-27T11:38:52+00:00Added an answer on May 27, 2026 at 11:38 am

    Yes use timestamps. That is the way which is usually used and both SQL server (any database server) and EF supports them. You will have to roundtrip timestamp to the client and use it when constructing entity to be updated (in detached scenario).

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

Sidebar

Related Questions

On my site (aimed at PS3 gamers), users can select the 3 games they're
I have a chess game that originally used an stl list to store the
i have list of rows that user select and i want to delete them,
I have an ASP.NET page that gets a list of game server ip addresses
I'm doing a game. I have a list of users (nicks): List<string> users; This
In a game, I'm trying to keep a list of users and have it
If you have say an HTML5 games arcade, that allows users to upload a
I have list of words. I type in a word misspelled. Can I query
I am trying to detect a users Steam games that are installed on their
I have a web site that collects high scores for a game - the

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.