Note that there are some explanatory texts on larger screens.

plurals
  1. POmulti-step registration process issues in asp.net mvc (split viewmodels, single model)
    primarykey
    data
    text
    <p>I have a <strong>multi-step registration process</strong>, backed by a <strong>single object in domain layer</strong>, which have validation rules defined on properties.</p> <p>How should I validate the domain object when the domain is split across many views, and I have to save the object partially in the first view when posted?</p> <p>I thought about using Sessions but that's not possible cause the process is lengthy and amount of data is high, So I don't want to use session.</p> <p>I thought about saving all the data in an relational in-memory db (with the same schema as main db) and then flushing that data to main db but issues arisen cause I should route between services (requested in the views) who work with the main db and in-memory db.</p> <p>I'm looking for an elegant and clean solution (more precisely a best practice).</p> <p><strong>UPDATE AND Clarification:</strong></p> <p>@Darin Thank you for your thoughtful reply, That was exactly what I've done till now. But incidentally I've got a request which have many attachments in it, I design a <code>Step2View</code> e.g. which user can upload documents in it asynchronously , but those attachments should be saved in a table with referential relation to another table that should have been saved before in <code>Step1View</code>.</p> <p>Thus I should save the domain object in <code>Step1</code> (partially), But I can't, cause the backed Core Domain object which is mapped partially to a Step1's ViewModel can't be saved without props that come from converted <code>Step2ViewModel</code>.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload