TS.FlexiReport
10.0.0
dotnet add package TS.FlexiReport --version 10.0.0
NuGet\Install-Package TS.FlexiReport -Version 10.0.0
<PackageReference Include="TS.FlexiReport" Version="10.0.0" />
<PackageVersion Include="TS.FlexiReport" Version="10.0.0" />
<PackageReference Include="TS.FlexiReport" />
paket add TS.FlexiReport --version 10.0.0
#r "nuget: TS.FlexiReport, 10.0.0"
#:package TS.FlexiReport@10.0.0
#addin nuget:?package=TS.FlexiReport&version=10.0.0
#tool nuget:?package=TS.FlexiReport&version=10.0.0
Flexi Report - Backend Library
This library is designed to support the backend functionalities required by the Flexi Report Angular library.
📌 Features
- Report Management: Create, edit, and manage reports.
- Dynamic SQL Queries: Retrieve data from the database with dynamic queries.
- Database Schema Retrieval: List tables and columns from the database.
- Flexible and Customizable: Supports dynamic components generated on the UI side.
🚀 Installation
To add this package to your project, run:
dotnet add package FlexiReport
📖 Usage
1️⃣ Retrieve Database Schema
Retrieve all tables and columns from the connected database:
public async Task<List<DatabaseSchemaDto>> GetDatabaseSchemaAsync(DbContext dbContext, CancellationToken cancellationToken = default)
Example Usage:
var schema = await flexiReportService.GetDatabaseSchemaAsync(dbContext);
2️⃣ Execute SQL Query
Only SELECT queries are allowed.
public async Task<Result<object>> ExecuteQueryAsync(QueryRequestDto request, DbContext dbContext, CancellationToken cancellationToken = default)
Example Usage:
var request = new QueryRequestDto("SELECT * FROM Users");
var result = await flexiReportService.ExecuteQueryAsync(request, dbContext);
3️⃣ Report Model
The Report model contains the following properties:
public sealed class Report
{
public Guid Id { get; set; }
public string Content { get; set; }
public DateTime CreatedAt { get; set; }
public string Endpoint { get; set; }
public string Name { get; set; }
public string PageSize { get; set; }
public string PageOrientation { get; set; }
public string FontFamily { get; set; }
public string SqlQuery { get; set; }
public string BackgroundColor { get; set; }
public List<RequestElement>? RequestElements { get; set; }
}
4️⃣ API Integration
To integrate with the frontend, use the following API structure:
[HttpPost("execute-query")]
public async Task<IActionResult> ExecuteQuery([FromBody] QueryRequestDto request)
{
var result = await _flexiReportService.ExecuteQueryAsync(request, _dbContext);
return result.IsSuccess ? Ok(result.Value) : BadRequest(result.Error);
}
📌 DTO Models
QueryRequestDto
public sealed record QueryRequestDto(
string SqlQuery);
ReportDto
public sealed record ReportDto(
Guid? Id,
string Content,
string Endpoint,
string Name,
string PageSize,
string PageOrientation,
string FontFamily,
string SqlQuery,
string BackgroundColor,
List<RequestElementDto> RequestElements);
📜 License
Distributed under the MIT License.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.EntityFrameworkCore.SqlServer (>= 10.0.0)
- TS.Result (>= 10.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.0.0 | 286 | 11/13/2025 |
Initial release with core features:
- Dynamic SQL query execution
- Database schema retrieval
- Report model with customizable properties
- API integration for frontend communication