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.
Fakes/Server/Validation/RootThrowsException.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Threading.Tasks;
7
9{
11 public class RootThrowsException : BusinessBase<RootThrowsException>
12 {
13 private static int _counter = 0;
14 public static int Counter
15 {
16 get { return _counter; }
17 set { _counter = value; }
18 }
19
20 protected override void AddBusinessRules()
21 {
22 System.Threading.Interlocked.Increment(ref _counter);
23 throw new ArgumentException();
24 }
25
26 [Create]
27 private async Task DataPortal_Create()
28 {
29 await BusinessRules.CheckRulesAsync();
30 }
31 }
32}
This is the base class from which most business objects will be derived.
Definition: BusinessBase.cs:38
@ Serializable
Prevents updating or inserting until the transaction is complete.
@ Create
Create operation.