Created
February 28, 2021 08:32
-
-
Save kelumKP/bae97d96964af998dc2013c693ef843b to your computer and use it in GitHub Desktop.
Program class Main method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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