You can paste these class definitions into your application program. If this has been done for a MOVIE class in a database called Movies, the following simple code works:
using Pyrrho;
class Test
{
public static void Main(string[] args)
{
var db = new PyrrhoConnect("Files=Movies");
db.Open();
var obs = db.Get("/MOVIE");
foreach(MOVIE m in obs)
Console.WriteLine(m.TITLE);
db.Close();
}
}
POCO stands for Plain Old CLR Object. The above example is using the following API in the PyrrhoConnect class:
| Property or Method signature | Explanation |
|---|---|
| object[] Get(string rurl) | Return the set of objects selected by the given relative URL |
| void Get(object ob,string rurl) | The actual type of the object should match the first object returned by the URL. Fills the object with the data returned. |
| void Post(object ob) | Installs the given object as a new row in the appropriate base table. |
| void Put(object old,object ob) | The old object should have been obtained from the database using one of the Get methods above. ob should be an updated version of this: the database will be updated. |
| void Delete(object ob) | The object should have been obtained from the database using one of the Get methods above. The object will be deleted from the database. |


This comment has been removed by the author.
ReplyDeleteI have never even had the opportunity to try programming and who know, maybe today I would be a programmer in a some company. However, at this moment, the applications provided by https://grapeup.com/services/application-transformation/ are sufficient for me because I know that continuous upgrade of the native application making their better.
ReplyDelete