BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Microsoft Patterns & Practices Team publishes Repository Factory

Microsoft Patterns & Practices Team publishes Repository Factory

The Repository Factory is a new guidance package from the Microsoft Patterns & Practices Team. It replaces the Data Access Guidance Package, which has been integrated into the Web Service Software Factory (WSSF).

As Johnny Halife points out on his blog the guidance package is not an object-relational-mapping (ORM) tool, it "is intended to be a light-weight code generator that automates most of the tasks needed to generate a domain model object and persist them to data base". Johnny lists the improvements of the Repository Factory, which have been added to the guidance package during its first and second week of development:

  1. The package has been migrated to GAT/GAX July 2007 CTP.
  2. All dependencies to the WSSF have been removed. Thus the Repository Factory is a completely separate Guidance Package, now.
  3. The generic code, which consists of base classes and has been formerly generated by the package, is now packed into a separate DLL that is referenced by the Repository Factory project.
  4. A generic Interface is generated in order to support the IoC pattern.
  5. In addition to the generic Interface a Factory class is generated, which might be configured in the project's config file. Thereby the implementation of the Repository Factory can be switched by modifying the configuration.
  6. An automatic mapping of entity fields to Stored Procedure parameters (for custom storage operations) has been added.
  7. Database name and configuration have been moved from the generated Repository to the Repository<T> base class. The connection string can be defined within the configuration.
  8. Settings (operations and mappings) of a repository recipe can now be saved in order to be reused.

The Repository Factory is work in progress. The current drop can be downloaded from the CodePlex site. Since the project is community oriented, you might influence the feature set by voting for your favorite feature on the community site.

Rate this Article

Adoption
Style

BT