GithubHelp home page GithubHelp logo

yvlawy / etagair-configurator-api Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 295 KB

General purpose Configurator API/Library for products, services and more...

C# 100.00%
dotnet csharp configurator library api netcoreapp config configuration configuration-management

etagair-configurator-api's Introduction

What is Etagair?

The Etagair Application

Etagair is a general purpose Configurator API for modeling and managing products, services, or everything else.

It's developed in C# language based on .NET Standard 2.0 and it is provided as a set of several libraries. It's a back-office API, there is no UI. Data are saved in a embedded database.

For more details, see the wiki

Key features

-Embedded .NET family assembly, platform independent with reference to one library: LiteDB, A lightweight embedded .NET NoSQL document store in a single datafile.

-Management of complex objects : entities with properties (list of key-value).

-Entities are organized hierarchically in folders.

-Creation of complex entities based on template.

-Localized media, only text for now (by using text code).

-Rich search of entities by properties criteria.

Getting started

Using clauses

Create a C# application. Import the Nuget package (see the link below). In the program, include these using:

  using Etagair.Core.System;
  using Etagair.Engine;

Create the engine and the database

These lines of code create the engine object. The init method create the database or use the existing one.

  EtagairEngine engine = new EtagairEngine();

  // the path must exists, it's the location where to put the database file
  string dbPath = @".\Data\";

  // create the database or reuse the existing one
  if (!engine.Init(dbPath))
  {
    Console.WriteLine("Db initialization Failed.");
    return;
  }

  // the database is created or reused and opened, it is ready to the execution
  Console.WriteLine("Db initialized with success.");

Create a folder within an entity

For example, create a folder named "computers", under it, add an entity having two properties. An entity haven't a name. Property of an entity is key-value pair.

The data:

F:computers\
  E:   
  "Name"= "Toshiba Satellite Core I7"
  "Trademark"= "Toshiba"

The Code:

// create a folder, under the root
Folder foldComputers = engine.Editor.CreateFolder(null, "computers");

// create an entity, under the computers folder
Entity toshibaCoreI7 = engine.Editor.CreateEntity(foldComputers);

// add 2 properties to the entity (key - value)
engine.Editor.CreateProperty(toshibaCoreI7, "Name", "Toshiba Satellite Core I7");
engine.Editor.CreateProperty(toshibaCoreI7, "Trademark", "Toshiba");

Package on Nuget

The application is ready to use and is available on Nuget. The last version is 0.0.5-alpha.

The web site: https://www.nuget.org/packages/Etagair/

The last release: https://www.nuget.org/packages/Etagair/0.0.5-alpha

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.