8using System.Collections.Generic;
20 [System.Diagnostics.DebuggerNonUserCode]
46 BusinessRules.CheckRules();
53 BusinessRules.CheckRules();
56 private void DoCreate(
int id)
63 throw new Exception(
"Bad data");
66 private void DataPortal_Fetch()
71 private void DataPortal_Fetch(
int id)
76 private void DoFetch(
int id)
79 TestResults.Reinitialise();
80 TestResults.Add(
"Single",
"Fetched");
83 throw new Exception(
"Bad data");
89 DoInsertUpdate(
false);
98 private void DoInsertUpdate(
bool isUpdate)
100 var insertOrUpdate = isUpdate ?
"Updated" :
"Inserted";
116 private void DataPortal_Delete(
int id)
158 private void DataPortal_Create(
int id)
161 throw new Exception(
"bad value");
163 BusinessRules.CheckRules();
166 private void DataPortal_Fetch()
171 private void DataPortal_Fetch(
int id)
174 throw new Exception(
"bad value");
176 BusinessRules.CheckRules();
183 throw new Exception(
"bad value");
190 throw new Exception(
"bad value");
197 throw new Exception(
"bad value");
201 private void DataPortal_Delete(
int id)
204 throw new Exception(
"bad value");
221 private void Create()
226 private void Create(
int value)
235 throw new Exception(
"bad value");
Provides consistent context information between the client and server DataPortal objects.
This is the base class from which most business objects will be derived.
This is the base class from which command objects will be derived.
Maintains metadata about a property.
Base class to be used when creating a data portal factory object.
Class containing the default implementation for the FactoryLoader delegate used by the data portal ho...
void DataPortal_DeleteSelf()
static readonly PropertyInfo< int > IdProperty
static readonly PropertyInfo< int > ValueProperty
void DataPortal_Execute()
void DataPortal_Create(int id)
void DataPortal_DeleteSelf()
static readonly PropertyInfo< int > IdProperty
static readonly PropertyInfo< string > MethodCalledProperty
async Task< object > Create()
SingleWithFactoryFactory(ApplicationContext applicationContext)
async Task< object > Fetch()
Static dictionary-like class that offers similar functionality to GlobalContext This is used in tests...
static void Reinitialise()
Reinitialise the dictionary, clearing any existing results, ready for the next test
static void Add(string key, string value)
Add an item to the test results, to indicate an outcome of a particular operation
@ Serializable
Prevents updating or inserting until the transaction is complete.
@ Update
Update operation (includes insert, update and delete self).
@ Execute
Execute operation.
@ Create
Create operation.
@ Delete
Delete operation.