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.
ERitem.cs
Go to the documentation of this file.
1//-----------------------------------------------------------------------
2// <copyright file="ERitem.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{
15 public class ERitem : BusinessBase<ERitem>
16 {
17 public static PropertyInfo<string> DataProperty = RegisterProperty<string>(c => c.Data);
18 public string Data
19 {
20 get { return GetProperty(DataProperty); }
21 set { SetProperty(DataProperty, value); }
22 }
23
24 public ERitem()
25 { }
26
27 [Create]
28 private void Create()
29 {
30 }
31
32 [Create]
33 private void Create(string data)
34 {
35 using (BypassPropertyChecks)
36 Data = data;
37 }
38
39 [Fetch]
40 private void Fetch(string data)
41 {
42 using (BypassPropertyChecks)
43 Data = data;
44 }
45
46 [Insert]
47 protected void DataPortal_Insert()
48 {
49 TestResults.Add("DP", "Insert");
50 }
51
52 [Update]
53 protected void DataPortal_Update()
54 {
55 TestResults.Add("DP", "Update");
56 }
57
58 [DeleteSelf]
59 protected void DataPortal_DeleteSelf()
60 {
61 TestResults.Add("DP", "DeleteSelf");
62 }
63
64 [Delete]
65 protected void DataPortal_Delete(object criteria)
66 {
67 TestResults.Add("DP", "Delete");
68 }
69 }
70}
This is the base class from which most business objects will be derived.
Definition: BusinessBase.cs:38
Maintains metadata about a property.
void DataPortal_Delete(object criteria)
Definition: ERitem.cs:65
static PropertyInfo< string > DataProperty
Definition: ERitem.cs:17
Static dictionary-like class that offers similar functionality to GlobalContext This is used in tests...
Definition: TestResults.cs:21
static void Add(string key, string value)
Add an item to the test results, to indicate an outcome of a particular operation
Definition: TestResults.cs:29
@ Serializable
Prevents updating or inserting until the transaction is complete.
@ Update
Update operation (includes insert, update and delete self).
@ Delete
Delete operation.