Skip to content

johnnyoshika/infra

Repository files navigation

Infra

This repository contains a collection of infrastructure projects that should be added as a submodule inside of another repository.

Setup

  • Go do a Git repository where you'd like to add these infrastructure projects.
  • Add this repository as a submodule:
    • git submodule add https://github.com/bcjobs/infra.git Infra
  • Open Solution in Visual Studio.
  • Right-click solution name and select:
    • Add --> New Solution Folder
  • Name the solution folder Infra
  • One by one, add all of the projects in the submodule into the solution.
  • If you encounter any problems with Entity Framework dependencies while trying to build one of these added projects, uninstall and re-install Entity Framework Nuget packages.
  • Add references too all projects in Infra folder to any project that will need them (e.g. web project).

Autofac Config

Identity

Project Properties

These are recommendations only and not required to use this library.
Every time you add a new project, these changes to the project properties are recommended:

  • Build tab:
    • Configurations: All Configurations
    • Supress warnings: 1998 If Code Contracts is installed:
  • Code Contracts tab:
    • Configurations: All Configurations
    • Perform Runtime Contract Checking: select checkbox and select Full from the dropdown
    • Contract Reference Assembly: Build
    • Emit contracts into XML doc file: select checkbox

IoC Autodiscovery

To ensure that all implementations of interfaces in a project are auto-discovered, do the following:

  • Open AssemblyInfo.cs file (nested inside Properties in Solution Explorer)
  • Add this to the bottom:
    • [assembly: IoC]
    • Don't forget the using statement at the top:
      using Infra.IoC;

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages