Replies: 3 comments
-
Mike,
You should be able to use an include or fetch the data in your factory or DAL class. Something like
PurchaseOrder
Int Id
List<PurchaseOrderLine> Lines;
List<PurchaseOrderAddress> Addresses;
Var query = _context.PurchaseOrders
.Include(a=>a.PurchaseOrderLines)
.Include(a=>a.PurchaseOrderAddresses)
Where(a=>a.Id = requestedId);
Var po = await query.ToListAsync();
In your CSLA class, you will map PurchaseOrder to cslaPurchaseOrder and then bind to that using your choice of UI controls
Regards,
Kevin
From: ***@***.***>
Sent: Tuesday, May 16, 2023 10:43 AM
To: ***@***.***>
Cc: ***@***.***>
Subject: [MarimerLLC/csla] CSLA 7 DataPortals and Parent, child list clarification (Discussion #3339)
I'm in the process of porting CSLA 5.5 code to CSLA 7.
I have a parent table with 2 child lists. Does this mean when fetching a record do I need tp pass 3 IDataPortals ParentPortal, Child1Portal and Child2Portal?
Thanks,
Mike
—
Reply to this email directly, view it on GitHub<#3339>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AGJTVDUXGPU2IE6AC4XCZ3TXGOHAJANCNFSM6AAAAAAYDYOBKU>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks for responding. Does the fetch, delete and update of the children need a dataportal passed to it? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Are they part of the parent or done separately. I do mine separately and don’t have a lot of parent child objects, so each needs a dataportal. If you’re using a traditional parent-child and Entity Framework, then you don’t need a dataportal for each operation as EF will take care of the work.
Regards,
Kevin
From: ***@***.***>
Sent: Tuesday, May 16, 2023 1:12 PM
To: ***@***.***>
Cc: Kevin ***@***.***>; ***@***.***>
Subject: Re: [MarimerLLC/csla] CSLA 7 DataPortals and Parent, child list clarification (Discussion #3339)
Thanks for responding. Does the fetch, delete and update of the children need a dataportal passed to it?
—
Reply to this email directly, view it on GitHub<#3339 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AGJTVDXJVLW6ZNGRLFAVWTTXGOYRPANCNFSM6AAAAAAYDYOBKU>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm in the process of porting CSLA 5.5 code to CSLA 7.
I have a parent table with 2 child lists. Does this mean when fetching a record do I need tp pass 3 IDataPortals ParentPortal, Child1Portal and Child2Portal?
Thanks,
Mike
Beta Was this translation helpful? Give feedback.
All reactions