-
Notifications
You must be signed in to change notification settings - Fork 269
Open
Description
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; }
// 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.
Metadata
Metadata
Assignees
Labels
No labels