Welcome Guest! To enable all features please Login or Register.



Services and the frontends
#1 Posted : Tuesday, June 28, 2011 5:09:20 AM(UTC)

Was thanked: 2 time(s) in 2 post(s)
With regards to the interface methods created for the services:
And I'll use Employee Table in this case (as per the example):

EmployeeKey Create();
void Update(Employee_UpdateInput input);
void Delete(EmployeeKey input);

The Create() method simply creates a new EmployeeKey for the new object? Its not passed any input. Now back to the forms. The "Save" methods in each form, calls the Update method from the Service, passing the Employee_UpdateInput. For new and existing Employees.

Is the Details form, out of the box, intended to be an Update form?
#2 Posted : Tuesday, June 28, 2011 8:35:26 AM(UTC)

While you can define service layer operations any which way you want to fit your application architecture, the default implementation leverages stateful communication with the service layer to allow a better reuse of the service operations.

In particular, the Create service method is supposed to just create a new object in memory on the business layer and return its temporary key back to the client. The client will then be able to use this temperate key to immediately call an Update service method within the same session, and then the SaveChanges in the same session to commit all the changes to the database. This way you don't have to repeat all the same input parameters for the Create method as you have for Update method.

The generated Details form works indeed only as an update form out of the box. However, this form is intended to be edited manually for the final product and can be easily updated to support creation of objects as well. What you need to do is to invoke it in a "create mode" without an object key and then call the Create service method before calling the Update during the Save button click.

We will take a look if we can update the generators to generate such forms in both create and update modes.
#3 Posted : Tuesday, June 28, 2011 9:20:15 PM(UTC)

Was thanked: 2 time(s) in 2 post(s)
Aye, working as intended. Just needed some clarification on that.

Thank you kindly.
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Copyright © 2009-2023 Xomega.Net. All rights reserved.