Eloquera Database
Store Method (obj)
NamespacesEloquera.ClientDBStore(Object)
This method stores an object in the database. It the object is present in the database, it will be updated, otherwise it will be added to the database.
Declaration Syntax
C#Visual BasicVisual C++
public long Store(
	Object obj
)
Public Function Store ( _
	obj As Object _
) As Long
public:
long long Store(
	Object^ obj
)
Parameters
obj (Object)
An object to store.
Return Value
A UID of the object inserted. 0 if the object to store is null (it is not stored). UID is a unique identifier for an object within the database. It can be used to identify the object within the database, for example, between page loads in the web applications.
Examples
Here is an example of storing a native object in the database.
CopyC#
db.Store(new Book() 
     { 
      Author = "Some author name", 
      YearPublished = DateTime.Now, 
      Edition = 3, 
      Price = 25.99, 
      Title = "Some good book", 
      ISBN = "978-0-12-345678-9" 
      });
An example below shows how you can insert a dynamic object:
CopyC#
Dynamic book = new Dynamic();
book["Author"] = "Charles Dickens";
book["Title"] = "Oliver Twist";
book["Price"] = 12.95;

db.Store(book);

// This will update already added object.
book["Printed"] = 2007;
db.Store(book);

Assembly: Eloquera.Client (Module: Eloquera.Client) Version: 4.5.0.0 (4.5.0.0)