Skip to content

2sky/Vidyano.Core

Repository files navigation

Vidyano.Core

NuGet NuGet Downloads License: MIT .NET .NET GitHub last commit

Official .NET client library for Vidyano applications. This library provides a comprehensive client-side SDK for connecting to Vidyano backend services.

Installation

Install the Vidyano.Core NuGet package:

dotnet add package Vidyano.Core

Or via Package Manager Console:

Install-Package Vidyano.Core

Quick Start

using Vidyano;

// Initialize the client
var client = new Client()
{
    Uri = "https://your-vidyano-service.com"
};

// Connect with credentials
await client.SignInUsingCredentialsAsync("username", "password");

// Execute a query
var query = await client.GetQueryAsync("YourQueryName");
await query.SearchTextAsync(string.Empty);

// Access results
foreach (var item in query)
{
    Console.WriteLine(item["PropertyName"]);
}

Demo Application

Check out the Demo folder for a complete console application that connects to our public demo service at https://demo.vidyano.com.

To run the demo:

cd Demo
dotnet run

Features

  • Cross-platform support - Works on Windows, Linux, and macOS
  • Multiple .NET targets - Supports .NET Standard 2.0 and .NET 8.0
  • Async/await patterns - Modern asynchronous programming model
  • MVVM architecture - Built-in support for data binding and property change notifications
  • Comprehensive action system - Execute backend actions with ease
  • Multi-language support - Internationalization for 30+ languages
  • Type-safe operations - Generic implementations for compile-time safety

Basic Usage

Connecting to a Service

var client = new Client()
{
    Uri = "https://your-service-url"
};
await client.SignInUsingCredentialsAsync("username", "password");

Working with Persistent Objects

// Get a persistent object
var po = await client.GetPersistentObjectAsync("Customer", "customer-id");

// Update attributes
po["Name"].Value = "New Name";
po["Email"].Value = "email@example.com";

// Save changes using the Save action
var saveAction = po.GetAction("Save");
if (saveAction != null && saveAction.CanExecute)
    await saveAction.Execute(null);

Executing Queries

// Get and execute a query
var query = await client.GetQueryAsync("Customers");
await query.SearchTextAsync(string.Empty);

// Access results (Query implements IReadOnlyList<QueryResultItem>)
foreach (var item in query)
{
    Console.WriteLine($"Customer: {item["Name"]}");
}

// Get total count
Console.WriteLine($"Total items: {query.TotalItems}");

// Paging through results
for (int i = 0; i < query.Count; i++)
{
    var item = query[i];
    Console.WriteLine($"Item {i}: {item.Id}");
}

Working with Actions

// Execute an action on a persistent object
var po = await client.GetPersistentObjectAsync("Order", "order-id");
var approveAction = po.GetAction("Approve");

if (approveAction != null && approveAction.CanExecute)
{
    await approveAction.Execute(null);
}

TypeScript/JavaScript Client

For TypeScript and JavaScript applications, we also provide an npm package:

npm version

npm install @vidyano/core

Learn more about the TypeScript client at @vidyano/core.

Documentation

For comprehensive documentation, visit www.vidyano.com.

Contributing

We welcome contributions! Please feel free to submit pull requests or open issues on our GitHub repository.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

For support and questions:

About Vidyano

Vidyano is a comprehensive application platform that enables rapid development of data-driven applications. Learn more at www.vidyano.com.


Copyright © 2025 2sky NV. All rights reserved.

About

No description, website, or topics provided.

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Contributors 5

Languages