IAggRootRepository<TEntity> Interface

The interface for repositories handling aggregate root entities. 


namespace KLO128.D3ORM.Common.Abstract
{
    public interface IAggRootRepository<TEntity> : ICommonRepository<TEntity> where TEntity : class
}

Assembly

KLO128.D3ORM.Common.Abstract

Base Types

ICommonRepository<TEntity> 

Type Parameters

TEntity : class

Properties

None

Methods

AddForSQLOnly(..)


void AddForSQLOnly(TEntity entity);

Description

Adds the root entity instance into the database and ignores children adds. 

Return Type

void

Parameters

# Name Type Description Default Value
1. entityTEntityroot entity to add

 

AddRoot(..)


void AddRoot(TEntity entity);

Description

Adds the root entity instance into the database. 

Return Type

void

Parameters

# Name Type Description Default Value
1. entityTEntityroot entity to add

 

DeleteRoot(..)


void DeleteRoot(TEntity entity);

Description

Deletes the root entity instance from the database. 

Return Type

void

Parameters

# Name Type Description Default Value
1. entityTEntityroot entity to delete

 

UpdateRootForSQLOnly(..)


void UpdateRootForSQLOnly(TEntity entity, bool subItemsChanged);

Description

Updates the root entity instance only (without effect of children). Not usable for NoSQL databases, where you update whole JSON context, document, or nothing. 

Return Type

void

Parameters

# Name Type Description Default Value
1. entityTEntityroot entity to update
2. subItemsChangedboolIndicates if some recursive child has a change.