Browse Source

Added repo doc.

pull/194/head
Halil İbrahim Kalkan 9 years ago
parent
commit
260d57a4ec
  1. 14
      docs/Index.md
  2. 10
      docs/Repositories.md
  3. 2
      test/Volo.Abp.TestApp/Volo/Abp/TestApp/Domain/Person.cs

14
docs/Index.md

@ -12,7 +12,19 @@
* <a href="Module-Development-Basics.md" target="_blank">Basics</a>
* Plug-In Modules
* Best Practices
* Domain Driven Design
* Domain Layer
* [Entities & Aggregate Roots](Entities.md)
* Value Objects
* [Repositories](Repositories.md)
* Domain Services
* Specifications
* Domain Events
* Application Layer
* Application Services
* Data Transfer Objects
* Unit Of Work
* Data Access
* [Entity Framework Core Integration](Entity-Framework-Core.md)
* Presentation (User Interface)
* Presentation / User Interface
* Localization

10
docs/Repositories.md

@ -0,0 +1,10 @@
## Repositories
"*Mediates between the domain and data mapping layers using a collection-like interface for accessing domain objects*" (Martin Fowler).
Repositories, in practice, are used to perform database operations for domain objects (see [Entities](Entities.md)). Generally, a separated repository is used for each **aggregate root** or entity.
### Generic Repositories
ABP can provide a default generic repository for each aggregate root or entity. You can [inject](Dependency-Injection.md) `IRepository<TEntity, TKey>` into your service and perform standard CRUD operations. Example usage:

2
test/Volo.Abp.TestApp/Volo/Abp/TestApp/Domain/Person.cs

@ -1,6 +1,8 @@
using System;
using System.Collections.ObjectModel;
using Volo.Abp.Application.Services;
using Volo.Abp.Domain.Entities;
using Volo.Abp.Domain.Repositories;
using Volo.Abp.MultiTenancy;
namespace Volo.Abp.TestApp.Domain

Loading…
Cancel
Save