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.
DCRoot.cs
Go to the documentation of this file.
1//-----------------------------------------------------------------------
2// <copyright file="DCRoot.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 System.Runtime.Serialization;
12using Csla;
13
15{
16 [DataContract]
17 public class DCRoot : BusinessBase<DCRoot>
18 {
19 [DataMember]
20 int _data;
21 public static PropertyInfo<int> DataProperty = RegisterProperty<int>(c => c.Data, RelationshipTypes.PrivateField);
22 public int Data
23 {
24 get { return GetProperty(DataProperty, _data); }
25 set { SetProperty(DataProperty, ref _data, value); }
26 }
27
28 private NonCslaChild _child = new NonCslaChild();
30 {
31 get { return _child; }
32 }
33
34 public static DCRoot NewDCRoot(IDataPortal<DCRoot> dataPortal)
35 {
36 return dataPortal.Create();
37 }
38
39 [Create]
40 private void Create()
41 {
42 }
43 }
44
45 [DataContract]
46 public class NonCslaChild
47 {
48 [DataMember]
49 private int _value;
50
51 public int TheValue
52 {
53 get { return _value; }
54 set { _value = value; }
55 }
56
57 }
58}
This is the base class from which most business objects will be derived.
Definition: BusinessBase.cs:38
Maintains metadata about a property.
static PropertyInfo< int > DataProperty
Definition: DCRoot.cs:21
static DCRoot NewDCRoot(IDataPortal< DCRoot > dataPortal)
Definition: DCRoot.cs:34
Interface defining the members of the data portal type.
Definition: IDataPortalT.cs:17
object Create(params object[] criteria)
Called by a factory method in a business class to create a new object, which is loaded with default v...
RelationshipTypes
List of valid relationship types between a parent object and another object through a managed propert...