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.netcore.test/DataBinding/ChildEntity.cs
Go to the documentation of this file.
1//-----------------------------------------------------------------------
2// <copyright file="ChildEntity.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;
11
13{
14 [Serializable()]
15 public class ChildEntity : BusinessBase<ChildEntity>
16 {
17 private int _ID;
18 private string _firstName = "";
19 private string _lastName = "";
20
21 public int ID
22 {
23 get { return _ID; }
24 }
25
26 public string FirstName
27 {
28 get { return _firstName; }
29 set
30 {
31 if (_firstName != value)
32 _firstName = value;
33 }
34 }
35
36 public string LastName
37 {
38 get { return _lastName; }
39 set
40 {
41 if (_lastName != value)
42 _lastName = value;
43 }
44 }
45
46 #region "Object ID value"
47
48 protected override object GetIdValue()
49 {
50 return _ID;
51 }
52
53 #endregion
54
55 internal ChildEntity(int id, string firstName, string lastName)
56 {
57 _ID = id;
58 _firstName = firstName;
59 _lastName = lastName;
60 }
61 }
62}
This is the base class from which most business objects will be derived.
Definition: BusinessBase.cs:38
override object GetIdValue()
Override this method to return a unique identifying value for this object.
@ Serializable
Prevents updating or inserting until the transaction is complete.