This question is locked. New answers and comments are not allowed.
I am evaluating OA and ran accross this scenario which I don't know a best way to handle:
The distributed content examples all use a changeset as the passed medium from presentation back to DAL to reassociated with scope. In my use in an MVC environment, I am getting a projection of domain data for use on a particular view. The projection is then my model for a page. Can I get that projection back into a changeset (or be able to access the changeset directly in an MVC environment as the view's model?
Flow:
Controller asks business layer for data (will expect a DTO that will serve as the view model).
Business layer defines specific filter (i.e., an ID) to an IQueryable that is returned from the DAL.
The business layer uses LINQ against the IQueryable to both apply filters and to project the output into a specified DTO.
Controller recevies the postback DTO from the view, sends it to business layer, and then to DAL.
The only recourse I see at the moment to ave the data in the DAL is to get the original record (IScope and Extent), apply the changes to the record, and then save. Works fine, but seems against the grain. I assume it can pull the record from L2 cache, but won't I be losing concurrency checking unless I can use the ObjectContainer to reassociate? I can't determine how to put the DTO back into a change set.
I can provide a code sample if needed.
Thanks
The distributed content examples all use a changeset as the passed medium from presentation back to DAL to reassociated with scope. In my use in an MVC environment, I am getting a projection of domain data for use on a particular view. The projection is then my model for a page. Can I get that projection back into a changeset (or be able to access the changeset directly in an MVC environment as the view's model?
Flow:
Controller asks business layer for data (will expect a DTO that will serve as the view model).
Business layer defines specific filter (i.e., an ID) to an IQueryable that is returned from the DAL.
The business layer uses LINQ against the IQueryable to both apply filters and to project the output into a specified DTO.
Controller recevies the postback DTO from the view, sends it to business layer, and then to DAL.
The only recourse I see at the moment to ave the data in the DAL is to get the original record (IScope and Extent), apply the changes to the record, and then save. Works fine, but seems against the grain. I assume it can pull the record from L2 cache, but won't I be losing concurrency checking unless I can use the ObjectContainer to reassociate? I can't determine how to put the DTO back into a change set.
I can provide a code sample if needed.
Thanks