Frameset.Common 1.1.3

dotnet add package Frameset.Common --version 1.1.3
                    
NuGet\Install-Package Frameset.Common -Version 1.1.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Frameset.Common" Version="1.1.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Frameset.Common" Version="1.1.3" />
                    
Directory.Packages.props
<PackageReference Include="Frameset.Common" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Frameset.Common --version 1.1.3
                    
#r "nuget: Frameset.Common, 1.1.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Frameset.Common@1.1.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Frameset.Common&version=1.1.3
                    
Install as a Cake Addin
#tool nuget:?package=Frameset.Common&version=1.1.3
                    
Install as a Cake Tool

Generic DotNet framework

DeepWiki

=========

Introduction

Based on Net Frame 8.Now including basic ORM frame support (including EF Core and Data Annotation Support).This may be most simplify code to intergrate ORM ability, Support Logic Delete Attribute and dao datasource Aspect defined Stream Reader/Writer for Excel and word. Customer Ioc Support to support AutoWire Service and support recursive AutoWired. United FileSystem and Data File Reader and Write,Support CSV/XML/JSON/AVRO/PARQUET/ORC File Format Add Serverless Function for dynamic load and unload DLL at runtime Customer MVC Frame to easy develop WebApi Bigdate Support for Nosql ElasticSearch/Cassandra/MongoDb/Hbase

  • Core SubModule

Specification

  • Customer Annotation MappingEntity MappingField
  • Global DAOFactory Manager Datasource;
  • Single JdbcDao per DataSource;
  • Service Layer BaseRepository,with basic CRUD operator,can enhace or override;
  • Mybatis xml query ability,with js script enabled;
  • Intergarte with propluar Database system;
  • Support EF core Annotation

Examples

  • DataSource Configration
dataSource:
 core:
  host: localhost
  port: 3316
  dbType: Mysql
  userName: root
  password: root
  maxSize: 10
  • DAO/Repository initialize Each Dao present as ADO Provider for one datasource

DAOFactory f = DAOFactory.init("f:/1.yaml");
//Construct Repository
BaseRepository<TestModel,long> repository = new Builder<TestModel,long>().build();

  • Customer IDbContext Thread safe DbContext,SaveChanges operation separate with ManagedThreadId,can switch dataSource with dsName at runtime.

IDbContext context = new DbContext();
DbContextFactory.Register(context);

  • Customer Ioc Support
RegServiceContext.ScanServices(typeof(ServiceAttribute));

Auto register Class with Attribute ServiceAttribute and recusive AutoWrie service with Attribute ResourceAttribute

  • CRUD Operator
DAOFactory f = DAOFactory.init("f:/1.yaml");
BaseRepository<TestModel,long> repository = new Builder<TestModel,long>().build();
TestModel model = new TestModel();
...  
//New Entity
repository.SaveEntity(model);
//
TestModel  model=repository.GetById(1);
//return models with single column Query
IList<TestModel> list=repository.QueryModelsByField("name", Constants.SqlOperator.LIKE, new object[] { "t" });
//Update
repository.UpdateEntity(model);
//Delete
repository.RemoveEntity(new long[] { 1 }.ToArray());
  • Batch Insert
DAOFactory f = DAOFactory.init("f:/1.yaml");
BaseRepository<TestModel,long> repository = new Builder<TestModel,long>().build();
IList<TestSimple> list = new List<TestSimple>();
for (int i = 0; i < 1000; i++)
{
    TestSimple simple = new TestSimple();
    simple.name = "col" + Convert.ToString(i);
    simple.tValue = i;
    simple.dTime = DateTime.Now;
    list.Add(simple);
}
return repository.InsertBatch(list);
  • Mybatis like Query
DAOFactory f = DAOFactory.init("f:/1.yaml");
BaseRepository<TestModel,long> repository = new Builder<TestModel,long>().build();

PageQuery query = new PageQuery(4);
query.Parameters.Add("Name", "t%");
query.NameSpace = "Frameset.Test";
query.QueryId = "select1";
PageDTO<TestVO> list = repository.QueryPage<TestVO>(query);

TestVO vo = new TestVO();
vo.Name = "test";
vo.Description = "test";
vo.CsId = 50;
repository.ExecuteMapper("Frameset.Test", "insert1", vo);
  • Mybatis config xml (compatiable with Mybatis,support js script)
<?xml version="1.0" encoding="UTF-8"?>
<mapper namespace="Frameset.Test">
    <resultMap id="rsMap1" type="Frametest.Dao.TestVO">
		<id property="Id"    column="id"    />
		<result property="Name"    column="name"    />
		<result property="CsId"    column="cs_id"    />
		<result property="CreateTime"    column="create_time"    />
		<result property="Description"    column="code_desc"    />
		
    </resultMap>
    <sql id="sqlpart1">
        id,name,code_desc,cs_id,create_time
    </sql>
    ...
    
</mapper>
  • Common SubModule

  • Read/Write File format(CSV/XML/JSON/AVRO/PARQUET) using FileSystem(Local/FTP/SFTP/WebHDFS/AmazonS3) Read From FileSystem

 DataCollectionBuilder builder = DataCollectionBuilder.NewBuilder();
 //using FileSystem Local
 builder.Path("e:/1.parquet").FsType(Constants.FileSystemType.LOCAL);

 using (AbstractDataIterator<Dictionary<string, object>> iterator = DataFileImporter.GetDataReader<Dictionary<string,object>>(builder.Build()))
 {
     while (iterator.MoveNext())
     {
         Dictionary<string, object> valueMap = iterator.Current;
         Log.Information("{valueMap}", valueMap);
     }
 }

Write to target FileSystem

DataCollectionBuilder builder = DataCollectionBuilder.NewBuilder();
//assign Path and column metadata define
builder.Path("e:/1.parquet").AddColumnDefine("id", Constants.MetaType.BIGINT).AddColumnDefine("name", Constants.MetaType.STRING)
    .AddColumnDefine("time", Constants.MetaType.TIMESTAMP).AddColumnDefine("amount", Constants.MetaType.INTEGER).AddColumnDefine("price", Constants.MetaType.DOUBLE);
Dictionary<string, object> cachedMap = new Dictionary<string, object>();
Random random = new Random(1231313);
long startTs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() - 3600 * 24 * 1000;
DateTime dateTime = new DateTime(1970, 1, 1, 0, 0, 0, 0);
using (AbstractDataWriter<Dictionary<string, object>> writer = DataFileExporter.GetDataWriter<Dictionary<string, object>>(builder.Build()))
{
    for (int i = 0; i < 1000; i++)
    {
        cachedMap.Clear();
        cachedMap.TryAdd("name", StringUtils.GenerateRandomChar(random, 12));
        cachedMap.TryAdd("time", dateTime.AddMilliseconds(startTs + i * 1000));
        cachedMap.TryAdd("amount", random.Next(1000) + 1);
        cachedMap.TryAdd("price", random.NextDouble() * 1000);
        cachedMap.TryAdd("id", Convert.ToInt64(i));
        writer.WriteRecord(cachedMap);
    }
}
  • Serverless Dynamic Dll support

1.With webapi project add in appsetting.json,serverlessPrefix Parameter

{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft.AspNetCore": "Warning"
    }
  },
  "AllowedHosts": "*",
  "serverlessPrefix": "/serverless",
  
}

Add Class with Method with Attribute ServerlessFunc,and pack to DLL

 public class TestService
    {
        [ServerlessFunc]
        public static object GetRole(HttpRequest request, HttpResponse response, long id, IBaseRepository<SysRole, long> repository)
        {

then use DynamicFunctionLoader RegisterFunction to register at runtime you can call through /serverless/{functionName} to call DLL function dynamic

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
1.1.3 93 5/12/2026
1.1.2 131 1/30/2026
1.1.1 118 1/5/2026
1.1.0 191 12/24/2025
1.0.4 281 12/17/2025
1.0.3 672 12/3/2025
1.0.2 129 11/29/2025
1.0.1 199 11/24/2025
1.0.0 408 11/19/2025