ELinq 0.4.1.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package ELinq --version 0.4.1.1
NuGet\Install-Package ELinq -Version 0.4.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="ELinq" Version="0.4.1.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ELinq --version 0.4.1.1
#r "nuget: ELinq, 0.4.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.
// Install ELinq as a Cake Addin
#addin nuget:?package=ELinq&version=0.4.1.1

// Install ELinq as a Cake Tool
#tool nuget:?package=ELinq&version=0.4.1.1

ELinq 是一个轻量简单易用的开源Linq ORM数据访问组件,支持Nullable类型和枚举类型,对Linq的谓词提供了完美的支持,旨在让绝大部份的主流数据库都使用 Linq 来进行程序开发,让开发人员访问数据库从SQL中解放出来,易学易用上手快,配置简单,并且提供了源代码下载,方便定制。支持多数据库,目前支持Access、SQLServer、SqlCE、SQLite、MySQL、ORACLE,未来还会支持更多的数据库。



        特点: 简单、高效、易用、灵活、快捷

      
       1.  配置简单,支持多数据库
       2.  支持Linq
       3.  支持集合对象的批量添加、删除、修改
       4.  灵活的批量删除(通过Linq表达式)功能
       5.  灵活的批量更新(通过Linq表达式)功能
       6.  支持一对一映射(不需要配置映射关系自动映射)
       7.  支持一对多(不需要配置映射关系自动映射)
       8.  支持多对一(不需要配置映射关系自动映射)
       9.  遵从数据库的设计理念,不支持多对多,可以把多对多转化成两个一对多
      10. 不支持级联更新、级联删除,开发人员完全手工维护外键引用完整性
      11. 不支持LazyLoad机制,默认就不会加载,除非指定Include方可
      12. 不支持Session缓存机制
      13. 不支持二级缓存
      14. OR映射不支持任何配置文件
      15. OR映射可以不需要任何Attribute配置
      16. OR映射的方式:a. Fluent API 方式,b. Attribute 方式,c. 约定方式,d. 混合方式(可以混合a、b、c 三种方式,映射的优先级a>b>c),e. Xml方式
      17. 字符串配置简单,遵从.net 的配置规范,没有另起灶炉,比如EF,或者NH
      18. 只要有有数据库关系理念、懂得Linq表达式就能马上上手
      19. ELinq 主要对字符串类型做了参数化,数值类型没有做参数化处理,由于有些数据库函数不支持数值类型的参数化参数。

        设计理念

       一: 约定胜于配置    

             连接字符串的配置完全遵循.Net 的连接字符串配置规范。

            表名映射原则: 默认情况下表名和实体类名完全一致,如果不一致那么可以通过TableAttribute标签来制定,或者通过SetClassNameToTalbeName策略方法来进行,也可以通过自定义ClassMap来进行

            列名映射原则:默认情况下实体的属性或字段和表中列名完全一致(不区分大小写),如果不一致那么可以通过ColumnAttribute标签来制定,也可以通过自定义ClassMap来进行

            单一主键映射原则:默认情况下实体的ID属性或”实体名称"+ID的属性自动映射为表的主键,当字段或属性的类型是Int型或Long类型时,那么该字段在数据库中应是自动增一或基于序列的方式

           多主键映射原则:如果表中有联合主键那么需要在是实体类中把对应的字段或属性添加IdAttribute标签即可

          一对多映射原则:假设有两个实体Customer 和 Order两个实体,Customer 里面包含一个Order的列表属性,那么只需要在Order类里面包含一个CustomerID 的属性或字段即可自动完成一对多映射,当然也可以通过AssociationAttribute标签来指定映射的ThisKey 和ThatKey来手动建立关联(建议自动建立)。

         多对一映射原则:假设有两个实体Customer 和 Order两个实体,Order里面包含一个Customer的属性引用,那么只需要在Order类里面包含一个CustomerID 的属性或字段即可自动完成一对多映射,当然也可以通过AssociationAttribute标签来指定映射的ThisKey 和ThatKey来手动建立关联(建议自动建立),其实一对多和多对一的映射完全一致都需要在多方的那里添加一个属性(一方的类名名称+“ID”)。
        多对多映射原则:不支持,需要转换成两个一对多映射,和数据库完

Product Compatible and additional computed target framework versions.
.NET Framework net35 is compatible.  net40 is compatible.  net403 was computed.  net45 was computed.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on ELinq:

Package Downloads
Nui

NLite Web 组件的特点 支持泛型Page 支持Ndf内核的WebApi 支持页面的DI、用户组件的DI注入 支持Web页面方法的自动路由 支持HttpListener,通过HttpListener自动扩展HttpModule 拥有灵活强大的性能监视接口:监视Web页面,监视Ndf服务分发器,监视Nlite WebApi

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.6.2.5 4,331 3/23/2013
0.6.2.4 1,329 3/17/2013
0.6.2.3 1,366 3/14/2013
0.6.2.2 1,312 3/12/2013
0.6.2.1 1,435 3/5/2013
0.6.2 1,363 2/24/2013
0.6.1.3 1,309 2/23/2013
0.6.1.2 1,336 2/20/2013
0.6.1.1 1,379 2/16/2013
0.6.1 1,403 2/15/2013
0.6.0.1 1,325 2/11/2013
0.6.0 1,342 2/2/2013
0.5.3 1,354 1/19/2013
0.5.2 1,343 1/11/2013
0.5.1.4 1,346 1/3/2013
0.5.1.3 1,378 12/30/2012
0.5.1.2 1,292 12/23/2012
0.5.0 1,334 12/22/2012
0.4.21 1,345 12/17/2012
0.4.3 1,334 12/22/2012
0.4.2 1,435 12/17/2012
0.4.1.1 1,440 12/15/2012
0.4.1 1,373 12/14/2012
0.4.0 1,811 12/8/2012
0.3.0.822 1,644 12/5/2012

基于https://elinq.codeplex.com/SourceControl/changeset/98305%E7%89%88%E6%9C%AC
1. 解决多对一映射的Bug
2. 支持XML 映射
3. 统一处理错误消息字符串
4. 在DbContext 中缓存DbSet
5. 修改事务支持的Bug
6. 增加扩展方法UsingTransaction 方便自动支持事务