You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
here,, I'm trying to use your code in modular wpf application based on GeminiWpf "By Tim Jones", to share Factory/Locator across modules, I have created this class to insure that all module uses the same Factory/Locator.
please take a few minutes to verify the class code.
did I need to dispose it?
public abstract class DataAccess
{
// private properties to hold Factory/Locator
private static IDbContextScopeFactory dbContextScopeFactory { get; set; }
private static IAmbientDbContextLocator ambientDbContextLocator { get; set; }
// public properties to create or retrieve and hold Factory/Locator
public static IDbContextScopeFactory DbContextScopeFactory
{
get
{
return dbContextScopeFactory is null ?
dbContextScopeFactory = new DbContextScopeFactory() : dbContextScopeFactory;
}
}
public static IAmbientDbContextLocator AmbientDbContextLocator
{
get
{
return ambientDbContextLocator is null ?
ambientDbContextLocator = new AmbientDbContextLocator() : ambientDbContextLocator;
}
}
}
and thank you for your time.
The text was updated successfully, but these errors were encountered:
hi sire.
good morning,
here,, I'm trying to use your code in modular wpf application based on GeminiWpf "By Tim Jones", to share Factory/Locator across modules, I have created this class to insure that all module uses the same Factory/Locator.
please take a few minutes to verify the class code.
did I need to dispose it?
public abstract class DataAccess
{
// private properties to hold Factory/Locator
private static IDbContextScopeFactory dbContextScopeFactory { get; set; }
private static IAmbientDbContextLocator ambientDbContextLocator { get; set; }
and thank you for your time.
The text was updated successfully, but these errors were encountered: