This question is locked. New answers and comments are not allowed.
HI--
Ours is a Web application utilizing the Web Client Software factory patterns and practices from Microsoft.
This involves data objects to be transported across multiple layers.
UI layer View and presenter
BUsiness module layer
Data access layer
All our ORM transactions are carried out at the data access layer. I would like you to provide suggesstion on how to implement a best posible solution.. Find below our curent approach
WE create the Objectscope in the DAL for the first time and keep it open.Assume i would like to list products in Radgrid and perform add and edit on it.
Step 1-- Using the objectscope i would get the list of products like objectscope.extent<Product> and use ToList to convert to List<Product>
This list is transported all the way to UI and assigned to the grid datasource
Step 2--User selects a record in the grid and performs edit..we use Popup edit form so the dataitem is transferred to the edit form and i store the same to viewstate.NOw the user edits the data and click the save button the object is again transfeered back all the way to DAL to update it.Where in again in DAL i retrieve the same record and copy the values from the object whihc i transferred from UI layer within a scope.transaction.
My question does the product object is still persistent when i retrieve from the radgrid item command dataitem or it is just a transient item. I guess it is transient as iam not opening any transaction to edit its values in the UI.Need to know once the data is loaded to grs the object becomes non persistent or still it is persistent.
also in certin situation we would be using asp.net wizard as a popu edit control by storing the dataitem in session and tranferring across pages.
please let us know your comments on our aproach or suggest best possible solution.Since we are using diffent layers would the maser page or the httpcontext would wok for us?
Ours is a Web application utilizing the Web Client Software factory patterns and practices from Microsoft.
This involves data objects to be transported across multiple layers.
UI layer View and presenter
BUsiness module layer
Data access layer
All our ORM transactions are carried out at the data access layer. I would like you to provide suggesstion on how to implement a best posible solution.. Find below our curent approach
WE create the Objectscope in the DAL for the first time and keep it open.Assume i would like to list products in Radgrid and perform add and edit on it.
Step 1-- Using the objectscope i would get the list of products like objectscope.extent<Product> and use ToList to convert to List<Product>
This list is transported all the way to UI and assigned to the grid datasource
Step 2--User selects a record in the grid and performs edit..we use Popup edit form so the dataitem is transferred to the edit form and i store the same to viewstate.NOw the user edits the data and click the save button the object is again transfeered back all the way to DAL to update it.Where in again in DAL i retrieve the same record and copy the values from the object whihc i transferred from UI layer within a scope.transaction.
My question does the product object is still persistent when i retrieve from the radgrid item command dataitem or it is just a transient item. I guess it is transient as iam not opening any transaction to edit its values in the UI.Need to know once the data is loaded to grs the object becomes non persistent or still it is persistent.
also in certin situation we would be using asp.net wizard as a popu edit control by storing the dataitem in session and tranferring across pages.
please let us know your comments on our aproach or suggest best possible solution.Since we are using diffent layers would the maser page or the httpcontext would wok for us?