Skip to content

Instantly share code, notes, and snippets.

@kelumKP
Created February 28, 2021 08:32
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 kelumKP/bae97d96964af998dc2013c693ef843b to your computer and use it in GitHub Desktop.
Save kelumKP/bae97d96964af998dc2013c693ef843b to your computer and use it in GitHub Desktop.
Program class Main method
[ExcludeFromCodeCoverage]
public static class Program
{
public static void Main(string[] args)
{
Console.WriteLine("Console App Started!….");
ConfigureContainer().Resolve<SampleInitialize>().Run();
Console.WriteLine("Console App Stopped!….");
}
private static IContainer ConfigureContainer()
{
var builder = new ContainerBuilder();
builder.RegisterType<SampleInitialize>().AsSelf();
builder.RegisterModule(new ServiceModule());
builder.RegisterModule(new EFModule());
Database.SetInitializer<TestDBContext>(null);
return builder.Build();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment