How can we improve Breeze.js?

Include Navigation Properties in BeforeSaveAllEntities save maps

Currently passing entity with navigation properties to the client. Once client modifies the entity or the navigation property entities they come back to the server during save separated making us write more code to perform validation and server side business logic.

EXAMPLE: I have a class called WorkOrder, Payment and Customer. The structure of the class is as follows:

WorkOrder
- WorkOrderID int
- WorkOrderNumber guid
- CustomerID int
- PaymentID int
- ExclationLvl int

Payment
- PaymentID int
- PaymentType int : reference lookup table called PaymentTypes which has the payment types (ie: Credit Card, Check, Paypal)
- Amount float
- PaymentDetailID int

Customer
- CustomerID int
- FirstName string
- LastName string
- CustomerType int : reference lookup table CustomerType (ie: Registered, UnRegistered)

Base on the payment type and the customer type the WorkOrder.ExclationLvl is determined. To do this currently we'll have to query the save maps for the WorkOrder entity, then query again for the Payment and Customer. If Payment and/or Customer is not found we'll have to query the DB (because only modified entities comeback to the server to be saved) for Payment and/or Customer then pass the WorkOrder, Payment and Customer to the business layer to be processed then save. Is there anyway the entire object that we pass to the client side can be passed back to the server?

6 votes
Vote
Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
You have left! (?) (thinking…)
Anonymous shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

0 comments

Sign in
(thinking…)
Sign in with: facebook google
Signed in as (Sign out)
Submitting...

Feedback and Knowledge Base