Skip to content

Instantly share code, notes, and snippets.

@endurance
Created September 15, 2015 21:48
Show Gist options
  • Save endurance/1412daa0181127be0e23 to your computer and use it in GitHub Desktop.
Save endurance/1412daa0181127be0e23 to your computer and use it in GitHub Desktop.
public class ClientCodeWithNinject
{
var exportFileService = Services.GetExportFileService();
}
public static class Services
{
public static ExportFileService GetExportFileService()
{
var kernel = new StandardKernel();
kernel.Bind<IExportFileRepository>()
.To<ExportFileRepository>();
kernel.Bind<IExportFileTypeRepository>()
.To<ExportFileTypeRepository>();
kernel.Bind<IImageStoreRepository>()
.To<ImageStoreRepository>();
return serviceKernel.Get<ExportFileService>();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment