[ROOT] / doc / DocFrag / ARCAPI.AddController
| Key | Value | 
|---|---|
| Assembly | ARCAPI | 
| DocFragType | Class | 
| Name | AddController | 
| Namespace | ARCAPI | 
| Type | AddController | 
ClassAttribute
| Key | Value | 
|---|---|
| AssemblyName | ARCAPI | 
| BaseTypes | PConcurrent; BaseController | 
| ClassNamespace | ARCAPI | 
| ClassType | AddController | 
| Interfaces | IP; -IEnumerable<IKIP>-; -IEnumerable- | 
Parses and stores a PropertyStreamLine.
Example: https://yourserver.com/Add/dt/Customer/42/FirstName = John
Sends to ExternalReceiver if given.
Adds to the given DataStorage unless DoNotStoreInternally is specified.
Bulk addition of data:
If HTTP POST is used and the parameter postData is given, then it will be treated as a collection of PropertyStreamLines, to which the original request will be prepended for every line.
Example:
If request is 'Add/Customer/42' and postData is the following two lines
  FirstName = John
  LastName = Smith
then it will be treated as two separate requests like
  Add/Customer/42/FirstName = John
  Add/Customer/42/LastName = Smith
TODO: Support use of Query for adding values to multiple entities at once.
TODO: like 'Add/Customer/WHERE FirstName = John/NameEvaluation = NiceName'
Hint: You can test input validation by using the inbuilt classes of ARCDoc.
(assuming that the Apple and Orange classes are included in AllIPDerivedTypes.)
Example queries:
api/Add/Apple/1/Colour = Red   // Should succeed
api/Add/Apple/1/Colour = Redd  // Should fail
api/Add/Apple/1/Color = Red    // Does not fail since Apple class accepts any property (it inherits PRich).
api/Add/Orange/1/Color = Red    // Sould fail since Orange accepts only Colour and Name (it inherits PExact<TEnumType>).
Generated 2025-10-31 17:26:57.462 UTC