public static IServiceCollection AddConsulConfig(this IServiceCollection services, ConfigurationSetting configurationSetting)
 {
     services.AddSingleton <IConsulClient, ConsulClient>(p => new ConsulClient(consulConfig =>
     {
         consulConfig.Address = new Uri(configurationSetting.ConsulAddresss);
     }));
     return(services);
 }
 public static void RegisterDbDependancies(this IServiceCollection services, ConfigurationSetting configurationSetting)
 {
     services.AddSingleton <IDatabaseContext>(new DatabaseContext(
                                                  configurationSetting.DatabaseSettings.ConnectionString,
                                                  configurationSetting.DatabaseSettings.DatabaseName));
 }