Densen.FreeSql.Extensions.BootstrapBlazor
7.7.4-beta02
This is a prerelease version of Densen.FreeSql.Extensions.BootstrapBlazor.
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Densen.FreeSql.Extensions.BootstrapBlazor --version 7.7.4-beta02
NuGet\Install-Package Densen.FreeSql.Extensions.BootstrapBlazor -Version 7.7.4-beta02
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="Densen.FreeSql.Extensions.BootstrapBlazor" Version="7.7.4-beta02" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Densen.FreeSql.Extensions.BootstrapBlazor --version 7.7.4-beta02
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Densen.FreeSql.Extensions.BootstrapBlazor, 7.7.4-beta02"
#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.
// Install Densen.FreeSql.Extensions.BootstrapBlazor as a Cake Addin #addin nuget:?package=Densen.FreeSql.Extensions.BootstrapBlazor&version=7.7.4-beta02&prerelease // Install Densen.FreeSql.Extensions.BootstrapBlazor as a Cake Tool #tool nuget:?package=Densen.FreeSql.Extensions.BootstrapBlazor&version=7.7.4-beta02&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
BootstrapBlazor的FreeSql数据注入服务扩展包
- 注入服务
//添加FreeSql服务
builder.Services.AddFreeSql(option =>
{
option.UseConnectionString(FreeSql.DataType.Sqlite, builder.Configuration.GetConnectionString("IdsSQliteConnection")) //也可以写到配置文件中
#if DEBUG
//开发环境:自动同步实体
.UseAutoSyncStructure(true)
.UseNoneCommandParameter(true)
//调试sql语句输出
.UseMonitorCommand(cmd => System.Console.WriteLine(cmd.CommandText + Environment.NewLine))
#endif
;
})
//全功能版
builder.Services.AddSingleton(typeof(FreeSqlDataService<>));
- FreeSql ORM 的 IDataService 数据注入服务接口实现
/// <summary>
/// 查询方法
/// </summary>
/// <param name="option"></param>
/// <returns></returns>
public override Task<QueryData<TModel>> QueryAsync(QueryPageOptions option)
/// <summary>
/// 查询方法
/// </summary>
/// <param name="option"></param>
/// <param name="WhereCascade">附加查询条件使用and结合</param>
/// <param name="IncludeByPropertyNames">附加IncludeByPropertyName查询条件, 单项可逗号隔开附加查询条件的第二个参数 then,可以进行二次查询前的修饰工作. (暂时只支持一个then附加)</param>
/// <param name="LeftJoinString">左联查询,使用原生sql语法,LeftJoin("type b on b.id = a.id")</param>
/// <param name="OrderByPropertyName">强制排序,但是手动排序优先</param>
/// <param name="WhereCascadeOr">附加查询条件使用or结合</param>
/// <param name="WhereLamda">查询条件,Where(a => a.Id > 10),支持导航对象查询,Where(a => a.Author.Email == "2881099@qq.com")</param>
/// <returns></returns>
public Task<QueryData<TModel>> QueryAsyncWithWhereCascade(
QueryPageOptions option,
DynamicFilterInfo? WhereCascade = null,
List<string>? IncludeByPropertyNames = null,
string? LeftJoinString = null,
List<string>? OrderByPropertyName = null,
List<string>? WhereCascadeOr = null,
Expression<Func<TModel, bool>>? WhereLamda = null)
/// <summary>
/// 全部记录
/// </summary>
/// <param name="WhereCascade">附加查询条件使用and结合</param>
/// <param name="IncludeByPropertyNames">附加IncludeByPropertyName查询条件, 单项可逗号隔开附加查询条件的第二个参数 then,可以进行二次查询前的修饰工作. (暂时只支持一个then附加)</param>
/// <param name="LeftJoinString">左联查询,使用原生sql语法,LeftJoin("type b on b.id = a.id")</param>
/// <param name="OrderByPropertyName">强制排序,但是手动排序优先</param>
/// <param name="WhereCascadeOr">附加查询条件使用or结合</param>
/// <param name="WhereLamda">查询条件,Where(a => a.Id > 10),支持导航对象查询,Where(a => a.Author.Email == "2881099@qq.com")</param>
/// <returns></returns>
public List<TModel>? GetAllItems(
DynamicFilterInfo? WhereCascade = null,
List<string>? IncludeByPropertyNames = null,
string? LeftJoinString = null,
List<string>? OrderByPropertyName = null,
List<string>? WhereCascadeOr = null,
Expression<Func<TModel, bool>>? WhereLamda = null)
- FreeSql ORM 查询工具类
FsqlUtil
/// <summary>
/// 执行查询
/// </summary>
/// <param name="options">查询条件</param>
/// <param name="optionsLast">缓存查询条件</param>
/// <param name="TotalCount"></param>
/// <param name="fsql"></param>
/// <param name="WhereCascade">附加查询条件使用and结合</param>
/// <param name="IncludeByPropertyNames">附加IncludeByPropertyName查询条件.<para></para>
/// 其中单项可逗号隔开附加查询条件的第二个参数 then,可以进行二次查询前的修饰工作. <para></para>
/// 单项第二个逗号隔开可第三层then附加</param>
/// <param name="LeftJoinString">左联查询,使用原生sql语法,LeftJoin("type b on b.id = a.id")</param>
/// <param name="OrderByPropertyName">强制排序,但是手动排序优先</param>
/// <param name="WhereCascadeOr">附加查询条件使用or结合</param>
/// <param name="forceAllItems">附加查询条件使用or结合</param>
/// <param name="WhereLamda">查询条件,Where(a => a.Id > 10),支持导航对象查询,Where(a => a.Author.Email == "2881099@qq.com")</param>
public static QueryData<TModel> Fetch<TModel>(
QueryPageOptions options,
QueryPageOptions? optionsLast,
long? TotalCount,
IFreeSql fsql,
DynamicFilterInfo? WhereCascade = null,
List<string>? IncludeByPropertyNames = null,
string? LeftJoinString = null,
List<string>? OrderByPropertyName = null,
List<string>? WhereCascadeOr = null,
bool forceAllItems = false,
Expression<Func<TModel, bool>>? WhereLamda = null) where TModel : class, new()
- TablePollo 组件
<h4>用户表</h4>
<TablePollo TItem="AspNetUsers" ItemDetails="NullClass" ItemDetailsII="NullClass" ShowColumnList />
<TablePollo TItem="AspNetUsers"
IncludeByPropertyNames="@IncludeAspNetUsers"
ItemDetails="AspNetUserRoles"
SubIncludeByPropertyNames="@SubIncludeByPropertyNames"
ItemDetailsII="NullClass"
ItemDetailsIII="NullClass"
ShowColumnList
ShowExportButton
ShowDetailRowS
Field="@nameof(AspNetUsers.Id)"
FieldD="@nameof(AspNetUserRoles.UserId)"
ExportToStream="false"
ExportBasePath="temp"/>
@code{
//通过 UserId 联表读取角色表 AspNetUserRoles 指定用户数据, 但是AspNetUsers表主键是 Id 字段, 详表指定 FieldD="UserId"
//附加导航IncludeByPropertyName查询条件
List<string> IncludeAspNetUsers
{
get => new List<string> {
$"{nameof(AspNetUsers.AspNetUserRoless)},{nameof(AspNetUserRoles.AspNetRoless)}" ,
};
}
List<string> SubIncludeByPropertyNames = new List<string> {
nameof(AspNetUserRoles.AspNetRoless) ,
};
}
更新日志
- 2023-6-3 添加 ItemDetailsIII , 选项卡3, 附加查询条件III
Product | Versions 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 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- BootstrapBlazor.Table.ImportExportsService (>= 7.7.0)
- Densen.Extensions.BootstrapBlazor (>= 7.7.0)
- FreeSql.Extensions.JsonMap (>= 3.2.696)
- FreeSql.Repository (>= 3.2.696)
- Newtonsoft.Json (>= 13.0.3)
-
net7.0
- BootstrapBlazor.Table.ImportExportsService (>= 7.7.0)
- Densen.Extensions.BootstrapBlazor (>= 7.7.0)
- FreeSql.Extensions.JsonMap (>= 3.2.696)
- FreeSql.Repository (>= 3.2.696)
- Newtonsoft.Json (>= 13.0.3)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Densen.FreeSql.Extensions.BootstrapBlazor:
Package | Downloads |
---|---|
BootstrapBlazor.Table.Freesql
BootstrapBlazor 的 Table 扩展 |
GitHub repositories (2)
Showing the top 2 popular GitHub repositories that depend on Densen.FreeSql.Extensions.BootstrapBlazor:
Repository | Stars |
---|---|
densen2014/BlazorMaui
用 c # 和 Razor 创建本机移动应用和桌面应用。使用 Blazor.BB.Maui,可以快速开发共享代码库运行于 Windows (Winforms/WPF/UWP)、Android、iOS、macOS 的应用。
|
|
densen2014/BlazorHybrid
关于BlazorHybrid的一切研究. 用 c # 和 Razor 创建本机移动应用和桌面应用。快速开发共享代码库运行于 Windows (Winforms/WPF/UWP)、Android、iOS、macOS、Linux 的应用。
|
Version | Downloads | Last updated | |
---|---|---|---|
9.1.2 | 0 | 12/22/2024 | |
9.0.1 | 38 | 12/22/2024 | |
9.0.0 | 120 | 11/13/2024 | |
8.10.5 | 130 | 10/16/2024 | |
8.10.4 | 111 | 10/16/2024 | |
8.7.5 | 125 | 7/30/2024 | |
8.7.1 | 163 | 7/7/2024 | |
8.7.0 | 107 | 7/1/2024 | |
8.6.0 | 121 | 6/5/2024 | |
8.4.0 | 367 | 4/6/2024 | |
8.3.4 | 158 | 3/9/2024 | |
8.3.2 | 123 | 3/7/2024 | |
8.3.1 | 138 | 2/26/2024 | |
8.3.0 | 142 | 2/25/2024 | |
8.2.3 | 135 | 2/12/2024 | |
8.2.2 | 145 | 2/9/2024 | |
8.2.1 | 125 | 2/9/2024 | |
8.2.0 | 135 | 2/5/2024 | |
8.1.13 | 126 | 1/31/2024 | |
8.1.12 | 155 | 1/20/2024 | |
8.1.11 | 110 | 1/19/2024 | |
8.1.10 | 146 | 1/18/2024 | |
8.1.8 | 390 | 1/15/2024 | |
8.1.7 | 127 | 1/14/2024 | |
8.1.6 | 120 | 1/12/2024 | |
8.1.5 | 134 | 1/12/2024 | |
8.1.4 | 150 | 1/8/2024 | |
8.0.4 | 149 | 1/8/2024 | |
8.0.3 | 136 | 1/8/2024 | |
8.0.2 | 122 | 1/8/2024 | |
8.0.1 | 153 | 1/4/2024 | |
8.0.0 | 249 | 11/15/2023 | |
7.10.4 | 387 | 9/3/2023 | |
7.10.3 | 156 | 9/3/2023 | |
7.10.2 | 163 | 9/3/2023 | |
7.10.1 | 168 | 9/2/2023 | |
7.8.0 | 227 | 7/15/2023 | |
7.7.9 | 248 | 6/12/2023 | |
7.7.8 | 232 | 6/7/2023 | |
7.7.7 | 184 | 6/6/2023 | |
7.7.5 | 179 | 6/3/2023 | |
7.7.4-beta02 | 150 | 6/3/2023 | |
7.7.3 | 148 | 6/3/2023 | |
7.7.1 | 170 | 6/2/2023 | |
7.7.0 | 178 | 6/2/2023 | |
7.2.3 | 1,199 | 3/20/2023 | |
7.2.2 | 396 | 3/20/2023 | |
7.2.1 | 958 | 2/24/2023 | |
7.2.0 | 301 | 2/23/2023 | |
7.1.1 | 451 | 1/30/2023 | |
7.1.0 | 359 | 1/14/2023 | |
7.0.0 | 410 | 11/9/2022 | |
6.8.0 | 704 | 8/3/2022 | |
6.7.0 | 435 | 8/3/2022 | |
6.5.0 | 650 | 4/30/2022 | |
6.4.0 | 468 | 4/29/2022 | |
6.3.2 | 512 | 3/23/2022 | |
6.0.2 | 378 | 12/21/2021 | |
6.0.0 | 318 | 12/20/2021 | |
0.0.5 | 396 | 4/12/2021 | |
0.0.4 | 375 | 2/4/2021 |