Skip to content

Instantly share code, notes, and snippets.

@PradeepLoganathan
Created February 1, 2020 07:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PradeepLoganathan/eb8f668f80bcf74b6d50f85591a8eb7a to your computer and use it in GitHub Desktop.
Save PradeepLoganathan/eb8f668f80bcf74b6d50f85591a8eb7a to your computer and use it in GitHub Desktop.
constructor injection
using Injector.Abstractions;
using System;
using System.Collections.Generic;
using System.Text;
namespace Injector
{
class ConsoleApplication
{
private readonly ICustomer _customer;
public ConsoleApplication(ICustomer customer)
{
_customer = customer;
}
public void Run()
{
_customer.CreateCustomer();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment