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/FieldManager/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//-----------------------------------------------------------------------
8
9using System;
10
12{
14 public class ChildList : BusinessBindingListBase<ChildList, Child>
15 {
16 public static ChildList GetList(IChildDataPortal<ChildList> childDataPortal)
17 {
18 return childDataPortal.FetchChild();
19 }
20
21 public ChildList()
22 {
24 }
25
26 public object MyParent
27 {
28 get { return this.Parent; }
29 }
30
31 private string _status;
32 public string Status
33 {
34 get { return _status; }
35 }
36
37 [FetchChild]
38 protected void Child_Fetch()
39 {
40 _status = "Fetched";
41 }
42
43 protected override void Child_Update(params object[] p)
44 {
45 base.Child_Update();
46 _status = "Updated";
47 }
48 }
49}
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...
static ChildList GetList(IChildDataPortal< ChildList > childDataPortal)
Interface defining the members of the child data portal type.
object FetchChild(params object[] criteria)
Called by a factory method in a business class to retrieve an object, which is loaded with values fro...
@ Serializable
Prevents updating or inserting until the transaction is complete.