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.
MockEditableRoot.cs
Go to the documentation of this file.
1//-----------------------------------------------------------------------
2// <copyright file="MockEditableRoot.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;
10
12{
14 public partial class MockEditableRoot : BusinessBase<MockEditableRoot>
15 {
16 public static readonly Guid MockEditableRootId = new Guid("{7E7127CF-F22C-4903-BDCE-1714C81A9E89}");
17
18 public MockEditableRoot() { }
19 public MockEditableRoot(Guid id, bool isnew)
20 {
21 SetProperty<Guid>(IdProperty, id);
22 if (!isnew)
23 MarkOld();
24 }
25
26 private static PropertyInfo<Guid> IdProperty = RegisterProperty(
27 typeof(MockEditableRoot),
28 new PropertyInfo<Guid>("Id"));
29
30 private static PropertyInfo<string> NameProperty = RegisterProperty<string>(
31 typeof(MockEditableRoot),
32 new PropertyInfo<string>("Name", RelationshipTypes.PrivateField));
33
34 private static PropertyInfo<string> DataPortalMethodProperty = RegisterProperty<string>(
35 typeof(MockEditableRoot),
36 new PropertyInfo<string>("DataPortalMethod"));
37
38 public Guid Id
39 {
40 get { return GetProperty(IdProperty); }
41 }
42 private string _name = NameProperty.DefaultValue;
43 public string Name
44 {
45 get { return GetProperty(NameProperty, _name); }
46 set { SetProperty(NameProperty, ref _name, value); }
47 }
48
49 public string DataPortalMethod
50 {
51 get { return GetProperty(DataPortalMethodProperty); }
52 set { SetProperty(DataPortalMethodProperty, value); }
53 }
54
55 public override string ToString()
56 {
57 return Id.ToString();
58 }
59 }
60}
This is the base class from which most business objects will be derived.
Definition: BusinessBase.cs:38
Maintains metadata about a property.
virtual T DefaultValue
Gets the default initial value for the property.
RelationshipTypes
List of valid relationship types between a parent object and another object through a managed propert...
@ Serializable
Prevents updating or inserting until the transaction is complete.