You.DbMapperNetCore 1.0.2.5

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

You.DbMapperNetCore

介绍

数据库操作层,泛型存储

软件架构

DM-M-R-V: 1)DM即DatabaseModel层,可由提供的自动生成工具类生成; 2)M即Mapper层,包含所有数据库表对应的sql操作的xml文件,保存在Mapper文件夹下,可由提供的自动生成工具类生成; 3) R即Respository仓储层,提供用户直接操作的辅助类,用户无需知晓底层数据库到底是什么样的,可由提供的自动生成工具类生成; 4)V即View层,也称为应用层,需要根据业务实际开发,引用时,需要将所使用的数据库类库进行引用,并引用以上三个类库,在启动函数中添加以下代码: | //路径初始化 PathManager.Init(); PathManager.IsUseMapperXMLFile = false;//mapper.xml文件作为嵌入的资源,可作为隐藏sql使用 //PathManager.IsUseMapperXMLFile = true;//mapper.xml文件生成时复制到输出目录,可后续进行更改,重启生效 //检测目标数据库是否存在,不存在则复制原始数据库文件到目标位置 if (!FileFolderHelper.IsFileExist(PathManager.AppConfigDbPath)) { string originalDbFilePath = System.IO.Path.Combine(PathManager.AppRoot, "Database\Sqlite\data.db"); if (FileFolderHelper.IsFileExist(originalDbFilePath)) { FileFolderHelper.Copy(originalDbFilePath, PathManager.AppConfigDbPath); } } | |--| alternate text is missing from this package README image

安装教程
  1. 新建.net项目,以sqlite为例,创建Database文件夹,添加data.db文件;

  2. 添加CommonUtils.dll, DatabaseService.dll, 以及lib目录下的SQLite.dll进行引用;

  3. 使用EntityMapperCreater.exe,对data.db文件进行解析生成;

    alternate text is missing from this package README image

  4. 创建DM层和Respository层,将生成的文件放到对应的层类库中,客户端项目对其进行引用即可

使用说明
  1. Mapper层的xml文件中包含的sql语句只是用于简单的增删改查,若需要更复杂的联表操作,需要手动修改Model,SQL,Respository等对应的字段以及操作方法;
  2. Mapper中的MethodId对应Repository中的DaoParametersEntity的methodId参数;
  3. 注意:DaoParametersEntity中parameters参数顺序需要按照SQL参数化的顺序,无需重复添加。
参与贡献
  1. Lockey.You创立初版
特技
  1. 使用 Readme_XXX.md 来支持不同的语言,例如 Readme_en.md, Readme_zh.md
  2. Gitee 官方博客 blog.gitee.com
  3. 你可以 https://gitee.com/explore 这个地址来了解 Gitee 上的优秀开源项目
  4. GVP 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
  5. Gitee 官方提供的使用手册 https://gitee.com/help
  6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 https://gitee.com/gitee-stars/
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.
  • net6.0

NuGet packages (2)

Showing the top 2 NuGet packages that depend on You.DbMapperNetCore:

Package Downloads
You.DbMapperNetCore.Sqlite

数据库mapper映射,sqlite数据库,支持扩展

You.DbMapperNetCore.Mysql

数据库mapper映射,mysql数据库,支持扩展

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.2.6 203 5/29/2026
1.0.2.5 162 3/16/2026
1.0.2.4 163 1/9/2026
1.0.2.3 178 1/9/2026 1.0.2.3 is deprecated because it has critical bugs.
1.0.2.2 210 12/20/2025
1.0.2.1 240 10/29/2025
1.0.1 275 6/18/2025 1.0.1 is deprecated because it is no longer maintained and has critical bugs.
1.0.0 256 6/18/2025 1.0.0 is deprecated because it is no longer maintained and has critical bugs.

1.添加泛型缓存,支持资源模式和文件模式