public void Should_Get_Class_FullName_If_Not_ConnStringNameAttribute_Specified()
 {
     ConnectionStringNameAttribute
     .GetConnStringName <MyClassWithoutConnStringName>()
     .ShouldBe(typeof(MyClassWithoutConnStringName).FullName);
 }
 public void Should_Get_ConnStringName_If_Not_Specified()
 {
     ConnectionStringNameAttribute
     .GetConnStringName <MyClassWithConnStringName>()
     .ShouldBe("MyDb");
 }
 public static string Resolve <T>(this IConnectionStringResolver resolver)
 {
     return(resolver.Resolve(ConnectionStringNameAttribute.GetConnStringName <T>()));
 }
 public static Task <string> ResolveAsync <T>(this IConnectionStringResolver resolver)
 {
     return(resolver.ResolveAsync(ConnectionStringNameAttribute.GetConnStringName <T>()));
 }
Пример #5
0
 public static Task <string> ResolveAsync(this IConnectionStringResolver resolver, Type type)
 {
     return(resolver.ResolveAsync(ConnectionStringNameAttribute.GetConnStringName(type)));
 }