CSLA.NET 6.0.0
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
Csla.test/DataPortalChild/ChildList.cs
Go to the documentation of this file.
1//-----------------------------------------------------------------------
2// <copyright file="ChildList.cs" company="Marimer LLC">
3// Copyright (c) Marimer LLC. All rights reserved.
4// Website: https://cslanet.com
5// </copyright>
6// <summary>no summary</summary>
7//-----------------------------------------------------------------------
8using System;
9using System.Collections.Generic;
10using System.Text;
11using Csla;
12
14{
16 public class ChildList : BusinessBindingListBase<ChildList, Child>
17 {
18 public ChildList()
19 {
21 }
22
23 public object MyParent
24 {
25 get { return this.Parent; }
26 }
27
28 private string _status;
29 public string Status
30 {
31 get { return _status; }
32 }
33
34 [FetchChild]
35 protected void Child_Fetch()
36 {
37 _status = "Fetched";
38 }
39
40 [UpdateChild]
41 protected override void Child_Update(params object[] p)
42 {
43 base.Child_Update(p);
44 _status = "Updated";
45 }
46 }
47}
This is the base class from which most business collections or lists will be derived.
void MarkAsChild()
Marks the object as being a child object.
Core.IParent Parent
Provide access to the parent reference for use in child object code.
override void Child_Update(params object[] p)
Saves all items in the list, automatically performing insert, update or delete operations as necessar...
@ Serializable
Prevents updating or inserting until the transaction is complete.