LibNetCore 1.1.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package LibNetCore --version 1.1.1
                    
NuGet\Install-Package LibNetCore -Version 1.1.1
                    
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="LibNetCore" Version="1.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LibNetCore" Version="1.1.1" />
                    
Directory.Packages.props
<PackageReference Include="LibNetCore" />
                    
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 LibNetCore --version 1.1.1
                    
#r "nuget: LibNetCore, 1.1.1"
                    
#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 LibNetCore@1.1.1
                    
#: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=LibNetCore&version=1.1.1
                    
Install as a Cake Addin
#tool nuget:?package=LibNetCore&version=1.1.1
                    
Install as a Cake Tool

Ver contains.

  • Common ( Class untilities support processed table, convert type etc)
  • Constants contains define constants
  • Core Contains class Dependency and Register auto -Data use DBhelper to help query databse, default SQL. -Excel help export data to excel. use template as xml or xls, xlsx to export data
  • Filter use filter data input -Resource Lib javascript, ( vuejs)
  • Session : use to processed session
  • Web : contains Report (rdlc) and register js and css to webform (cshtml)

Detail.

  • Required: If you wanna used componet wrote for design form contains: grid, textbox, drop (select2) , You must register Resource LibNetCore . Note. sys required Jquery.
  • In your project, file programe you config in service as follows.

    builder.Services.AddConfigService(); and app.UseConfig();

  • Next in file _layout.cshtml , you can add 2 code to register javascript and css library. @Html.RegisterCssFromResource() AND @Html.RegisterJsFromResource().

  • If you use connect db, in file config json you add source code.

"Conect": { "DB_NAME": "dbname", "IPSERVER": "localhost", "USERSQL": "sa", "PWSQL": "sa" },

Okie done, so we can use Lib c# and js

  • Report. used report rdlc.

to used it, you can download rdlc for vs on visual studio market or used Report build, save file *.rdl. OKie, to used it, you must using namepase: LibNetCore.Web.

In controller a write as follows

   string rdlc = "Report/Benhnhan_Mau".rdlc";   ( Define file report)

        ReportHelper rpt = new ReportHelper(rdlc);  ( Classs helper processed report)

-List<ReportParameter> paramaters = new List<ReportParameter>(); ( Define report paramater if you have)

and then add paramater and datasource to report if you have

rpt.DataSouce =DataSouce ; rpt.paramaters = paramaters;

  • next call method export.

    var kq = rpt.Export("PDF"); --Call export pdf, we can change to other paramater as excel ( xls) word, html... return byte array, web convert byte array to file save or return to views.

  • DATA. to used query database ( defaul SQL server), we used namepace : LibNetCore.Data, when web register config in step 1 then class Session, DbHelper Auto register DI. to used i define.

private IDbHelper _dbHelper; public DanhMucService(IDbHelper dbHelper) { _dbHelper = dbHelper; }

Lib used dapper to query so you can used it as dapper.

var parameters = new DynamicParameters(); -- Define Dynamic db

and call mothod

await _dbHelper.ExecuteNoneQueryAsyn(StoreProcedure, parameters); -- await _dbHelper.ExecuteQueryAsyn(b_sql); -- Execute query SQL await _dbHelper.ExecuteProcedureAsyn<T1>(storeProcedure); -- Execute procedure and return T1 class ( T 1model define), to return more class you can use T1,T2,T3... return Ienumable<T1>...

Link Git demo:

https://github.com/tieudoan208/LibNetCore.git

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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
2.2.3 205 12/14/2024
2.2.1 164 11/28/2024
2.2.0 164 11/26/2024
2.1.0 287 11/18/2023
1.2.0 313 4/8/2023
1.1.1 574 8/2/2022
1.1.0 532 7/17/2021
1.0.0 596 6/7/2022