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/ChildChanged/SingleRoot.cs
Go to the documentation of this file.
1//-----------------------------------------------------------------------
2// <copyright file="SingleRoot.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.Linq;
11using System.Text;
12using Csla;
14
16{
18 public class SingleRoot : BusinessBase<SingleRoot>
19 {
20 public SingleRoot()
21 { }
22
23 public SingleRoot(bool child)
24 {
25 if (child)
26 MarkAsChild();
27 }
28
29 private static PropertyInfo<string> NameProperty = RegisterProperty(new PropertyInfo<string>("Name", "Name"));
30 public string Name
31 {
32 get { return GetProperty(NameProperty); }
33 set { SetProperty(NameProperty, value); }
34 }
35
36 [Fetch]
37 [FetchChild]
38 private void Fetch(bool child)
39 {
40 if (child)
41 MarkAsChild();
42 }
43 }
44}
This is the base class from which most business objects will be derived.
Definition: BusinessBase.cs:38
Maintains metadata about a property.
@ Serializable
Prevents updating or inserting until the transaction is complete.