Repository and Unit of Work Template

Use this template to generate Repositories and Unit of Work for Entity Framework model. This template is available both in C# and Visual Basic.

Repository and Unit of Work template has the following properties:

General

Description

Description of the template.

Enabled

Indicates whether the template is enabled. Acceptable values are True or False.

File Name

The name of the template file.

Name

The name of the template.

Type

The type of the template.

Generation

Data Access Layer Namespace

Specifies the namespace for the generated data access layer classes for Entity Framework model.

Generate Memory Repository

If the value is set to True, the MemoryRepository class code will be generated. Acceptable values are True or False.

Generic Repository Pattern

Defines whether to generate the implementation of the generic repository pattern and IRepository<T> and whether the IRepository<T> interface will contain the method returning IQueryable<T>. No separate interface and repository class will be generated for entities. Acceptable values are True or False.

Header Timestamp Version Control Tag

Setting this option will replace the standard date/time stamp in the file header with the specified tag (e.g. a version control tag for Subversion, Git, etc.)

Interface Layer Namespace

Specifies the namespace for the generated interface layer classes.

Use Db Context

If set to True, the template is used for strongly-typed DbContext class, otherwise (and by default) it is used for strongly-typed ObjectContext class. Acceptable values are True or False.

Output

Data Access Layer Output

Specifies the output for the generated data access layer classes for Entity Framework model.

Project

(This property is available in the Visual Studio add-in only) The name of the Visual Studio project where the generation result will be located.

Project Folder

(This property is available in the Visual Studio add-in only) The name of the directory in the Visual Studio project where the generation result will be located.

Destination Folder

(This property is available in the standalone application only) The directory to contain the generation results.

Generate Partial

If the value is set to True, then for each repository interface and class, in case of non-generic repository pattern implementation generation, a partial interface and class will be generated, in which the user can add code that is not overwritten by the designer. Acceptable values are True or False.

Interface Layer Output

Specifies the output for the generated interface layer classes.

Project

(This property is available in the Visual Studio add-in only) The name of the Visual Studio project where the generation result will be located.

Project Folder

(This property is available in the Visual Studio add-in only) The name of the directory in the Visual Studio project where the generation result will be located.

Destination Folder

(This property is available in the standalone application only) The directory to contain the generation results.

 


Send feedback on this topic

© 2008 - 2024 Devart. All rights reserved.