Introduction Connection and transaction management is one of the most important concepts in an application that uses a database. When to open a connection, when to start a transaction, how to dispose the connection and so on.. ASP.NET Boilerplate man
1.实体Entites 1.1 概念 实体是DDD(领域驱动设计)的核心概念之一. 实体是具有唯一标识的ID且存储在数据库总.实体通常被映射成数据库中的一个表. 在ABP中,实体继承自Entity类. public class Person : Entity { public virtual string Name { get; set; } } Id是所有继承自Entity类的实体主键. Id数据类型可以被更改,默认是int(int32)类型. public class Person : En
Unit Of Work(UoW)模式在企业应用架构中被广泛使用,它能够将Domain Model中对象状态的变化收集起来,并在适当的时候在同一数据库连接和事务处理上下文中一次性将对象的变更提交到数据中. 从字面上我们可以我们可以把UnitOfWork叫做工作单元,从概念上它是协助代码块的事务.为什么我们需要用UnitOfWork?有人说EF不是的DbContext的SaveChanges不就有提交变更数据的功能吗?为什么还要多一层封装?是的,如果我们项目只是用EF的话,项目又会经常变更,不用考
前言 ABP ABP是“ASP.NET Boilerplate Project”的简称. ABP的官方网站:http://www.aspnetboilerplate.com ABP在Github上的开源项目:https://github.com/aspnetboilerplate ABP其他学习博客推荐及介绍:http://www.cnblogs.com/mienreal/p/4528470.html Unit of Work Unit of Work 又称之为“工作单元”,Unit of Wo
http://www.aspnetboilerplate.com/Pages/Documents/Unit-Of-Work 工作单元位于领域层. ABP的数据库连接和事务处理: 1,仓储类 ASP.NET Boilerplate opens a database connection and begins a transaction when entering a repository method. 当一个仓储方法开始执行时,ABP打开一个数据库连接并启用一个事务. 当仓储方法结束时,事务