{"id":20942641,"url":"https://github.com/kostkams/orientdb.net.core.businessobjects","last_synced_at":"2026-04-29T03:32:32.433Z","repository":{"id":143774092,"uuid":"166449184","full_name":"kostkams/OrientDB.Net.Core.BusinessObjects","owner":"kostkams","description":"A wrapper around the official OrientDB API","archived":false,"fork":false,"pushed_at":"2019-02-10T16:22:40.000Z","size":106,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-21T18:46:38.615Z","etag":null,"topics":["code-generation","code-generator","netcore2","orientdb-database","orientdb-driver"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kostkams.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-18T17:43:42.000Z","updated_at":"2019-04-30T13:29:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"e7b7456d-12db-40ac-8428-9db4b55e148b","html_url":"https://github.com/kostkams/OrientDB.Net.Core.BusinessObjects","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kostkams%2FOrientDB.Net.Core.BusinessObjects","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kostkams%2FOrientDB.Net.Core.BusinessObjects/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kostkams%2FOrientDB.Net.Core.BusinessObjects/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kostkams%2FOrientDB.Net.Core.BusinessObjects/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kostkams","download_url":"https://codeload.github.com/kostkams/OrientDB.Net.Core.BusinessObjects/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243335381,"owners_count":20274898,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-generation","code-generator","netcore2","orientdb-database","orientdb-driver"],"created_at":"2024-11-18T23:28:38.494Z","updated_at":"2025-12-30T04:37:28.481Z","avatar_url":"https://github.com/kostkams.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OrientDB.Net.Core.BusinessObjects\nA wrapper around the official OrientDB API with the possibility to generate business model classes.\n\n## Introduction to OrientDB.Net.Core.BusinessObjects\n\"OrientDB.Net.Core.BusinessObjects\" is a business layer that wrapps the office .NET API for [OrientDB](https://orientdb.com/). \nThe BusinessObject allows an easy access to the database. \nThe included generator uses JSON files to generate classes to manipulate the documents in the database.\n\n### Getting started\nFirst you need to download the latest release version of \"OrientDB.Net.Core.BusinessObjects.Generator\" \n[Link](https://github.com/kostkams/OrientDB.Net.Core.BusinessObjects/releases) or simply checkout and build the code.\n\n### Create the data model\nThe data model for your business domain will be generated based on a set of description JSON files.\n\nNow create a new JSON file and name it \"Tutorial.Person.bo.json\" (the name doesn't care). \nAdd the following content to the file.\n```json\n{\n  \"Name\": \"Tutorial\",\n  \"Namespace\": \"Tutorial\",\n  \"Projects\": [\n    {\n      \"Name\": \"Person\",\n      \"BusinessObject\": {\n        \"Types\":[\n          {\n            \"IsRoot\": true,\n            \"Name\": \"Person\",\n            \"ClassName\": \"Person\",\n            \"Properties\": [\n              {  \n                \"Name\": \"LastName\",\n                \"Type\": \"String\",\n                \"Required\": true,\n                \"DocumentPropertyName\": \"LastName\"\n             },\n             {\n                \"Name\": \"FirstName\",\n                \"Type\": \"String\",\n                \"Required\": true,\n                \"DocumentPropertyName\": \"FirstName\"\n             }\n            ]\n          }\n        ]\n      }\n    }\n  ]\n}\n```\n* `\"Name\": \"Tutorial\"` is the name of the whole generated project\n* `\"Namespace\": \"Tutorial\"` is the namespace for classes and interfaces\n* `\"Projects\"` each item describes a new generated project\n* `\"Name\": \"Person\"` name of the project\n* `\"BusinessObject\"` begin of the model description\n* `\"Types\"` represents a model class\n* `\"IsRoot\": true` can the class be constructed\n* `\"Name\": \"Person\"` name of the class and interface\n* `\"ClassName\": \"Person\"` name of the vertex in the database\n* `\"Properties\"` property list for the class\n* `\"Name\": \"LastName\"` name of the property\n* `\"Type\": \"String\"` type of the property (String, Integer, Double, Boolean, Guid, DateTime allowed)\n* `\"Required\": true` indicates that the value must be set while its saving in the database\n* `\"DocumentPropertyName\": \"LastName\"` name of the document property in the database\n\n### Generating the business object\nNow you can use the JSON to generate the business objects. \nOpen a new console and change the directory to the `OrientDB.Net.Core.BusinessObjects.Generator.exe`.\nUse the following command to generate:\n```\nOrientDB.Net.Core.BusinessObjects.Generator.exe -o \\outpuDir -c Tutorial.Person.bo.json\n```\n\n### Needed Assembly References\nTo run the a solution with the generated business objects, the following references are needed:\n* OrientDB-Net.binary.Innov8tive.dll (part of the 'OrientDB.Net.Core.BusinessObjects' release package)\n\nThe 'OrientDB.Net.Core.BusinessObjects' will be referenced automatically by nuget.\n\n### Accessing the data\nIn a new _Console_ project (\u003e= .NET Core 3.0) add the following usings:\n```C#\nusing OrientDB.Net.Core.BusinessObjects;\nusing Persion.Tutorial;\n```\nIn the _Main_ method add the following code:\n```C#\nprivate static void Main()\n{\n  var businessDocument = BusinessDocumentFactory.Connect(new ConnectionInfo(\"localhost\",\n                                                                            2424,\n                                                                            \"root\",\n                                                                            \"pwd\",\n                                                                            \"TestDatabase\",\n                                                                            EDatabaseType.Graph));\n  \n  // Create a new person\n  using (var session = businessDocument.OpenSession()) // Each time OpenSession is called, a new connection to the database is opened\n  {\n    var transaction = session.BeginTransaction();\n    var person = transaction.CreatePerson();\n    person.FirstName = \"John\";\n    person.LastName = \"Doe\";\n    transaction.Commit(); // The person will be saved in the database\n  }\n  \n  // Get the person by name\n  using (var session = businessDocument.OpenSession())\n  {\n    session.Get\u003cIPerson\u003e(p =\u003e p.FirstName == \"John\" \u0026\u0026 p.LastName == \"Doe\").First();\n  }\n}\n```\n\n### Next...\nDescription how to use Children and Refereces to other classes are coming soon...\nUse `\"Children\"` and `\"ReferenceLists\"` in the JSON file\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkostkams%2Forientdb.net.core.businessobjects","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkostkams%2Forientdb.net.core.businessobjects","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkostkams%2Forientdb.net.core.businessobjects/lists"}