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.
MultipleDataAccess.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Threading.Tasks;
6
8{
10 public class MultipleDataAccess
11 : MultipleDataAccessBase<MultipleDataAccess>
12 {
13 public static readonly PropertyInfo<string> NameProperty = RegisterProperty<string>(c => c.Name);
14 public string Name
15 {
16 get { return GetProperty(NameProperty); }
17 set { SetProperty(NameProperty, value); }
18 }
19
20 public static readonly PropertyInfo<bool?> BooleanValueProperty = RegisterProperty<bool?>(c => c.BooleanValue);
21 public bool? BooleanValue
22 {
23 get { return GetProperty(BooleanValueProperty); }
24 set { SetProperty(BooleanValueProperty, value); }
25 }
26 public static readonly PropertyInfo<int?> IntValueProperty = RegisterProperty<int?>(c => c.IntValue);
27 public int? IntValue
28 {
29 get { return GetProperty(IntValueProperty); }
30 set { SetProperty(IntValueProperty, value); }
31 }
32
33 [Fetch]
34 private new void Fetch(int id)
35 {
36 using (BypassPropertyChecks)
37 {
38 base.Fetch(id);
39
40 Name = "abc";
41 }
42 }
43
44 [Fetch]
45 private void Fetch(int id, bool? value)
46 {
47 using (BypassPropertyChecks)
48 {
49 base.Fetch(id);
50
51 Name = "abc";
52 BooleanValue = value;
53 }
54 }
55
56 [Fetch]
57 private void Fetch(int id, int? value)
58 {
59 using (BypassPropertyChecks)
60 {
61 base.Fetch(id);
62
63 Name = "abc";
64 IntValue = value;
65 }
66 }
67
68 [Fetch]
69 private void Fetch(List<int?> values)
70 {
71 TestResults.Reinitialise();
72 TestResults.Add("Method", "Fetch(List<int?> values)");
73 }
74
75 [Fetch]
76 private void Fetch(List<DateTime?> values)
77 {
78 TestResults.Reinitialise();
79 TestResults.Add("Method", "Fetch(List<DateTime?> values)");
80 }
81 }
82}
Maintains metadata about a property.
static readonly PropertyInfo< bool?> BooleanValueProperty
static readonly PropertyInfo< int?> IntValueProperty
static readonly PropertyInfo< string > NameProperty
@ Serializable
Prevents updating or inserting until the transaction is complete.