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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T16:49:16+00:00 2026-05-20T16:49:16+00:00

I like how cleanly an object is stored in ravenDB, but have a practical

  • 0

I like how cleanly an object is stored in ravenDB, but have a practical question for which I’m not sure of the best answer.

Lets say i have a quote request:

QuoteRequest.cs

int Id;
dateTime DateCreated;
List<Quotes> Quotes;

Quote.cs

int ProviderId;
int Price;
int ServiceDays;
int ServiceTypeId;

when someone hits a page, i spit out a list of quotes from which they can choose. These quotes are only related to an instance of the quote request.

My question is, since a child object, such as a quote in the list, doesnt have an Id generated by the database, how do I generate a querystring to let the next page know which quote the user wants to buy?

There could be multiple quotes by one providerId.

My thoughts were either add a QuoteId and increment it based on this.Quotes.Count, but that seems a little hacky, or generate a random number, also a little hacky.

How do people generally handle something like this?

  • 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-20T16:49:17+00:00Added an answer on May 20, 2026 at 4:49 pm

    Do you really need to associate the purchase (what the user chose to buy) with the original quote? I’m guessing that you take the quote and then convert it to a purchase.
    If that is so, then don’t worry about an id at all. Just pass along the constituent values to the next step. In other words, treat quote like a Value in the DDD sense.

    However, if you do need to store an association to the purchase… well, then it depends on what you really need to track. For example, you could just update the QuoteRequest, marking the selected quote. (Add an IsSelected or something similar to the quote class Quote.) Then the purchase could be linked back to the quote request, and you could identify the quote by way of the flags.

    Again, all this depends on the context (and I’m just making guesses about that).

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

Sidebar

Related Questions

This is clearly not appears like it wouldn't be a best practice. Can someone
I have a c# factory object which creates objects through factory methods, using a
Like the Delicious submission bookmark-let, I'd like to have some standard JavaScript I can
Like many companies that require all access be through stored procedures, we seem to
I've inherited a web application which strictly uses stored procedures to do its job.
I have an object responsible for persisting JTable state to disk. It saves/loads visible
Say I have defined a variable like this (C++): static const char str[] =
In my WPF application I have a list of DocumentViewers which are bound to
I know I can do things like <input name=foo[]> , but is it possible
Like many others on this site I am considering a move to ASP.NET MVC

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.