public static IDbContext GetContext <T>(this DbSet <T> dbSet) where T : class
 {
     return(GeneralContext.GetService <IDbContext>());
 }
示例#2
0
 public UserControllerTest()
 {
     _userService = GeneralContext.GetService <UserService>();
 }
示例#3
0
 public ActivityControllerTest()
 {
     _activityService         = GeneralContext.GetService <ActivityService>();
     _activityTemplateService = GeneralContext.GetService <ActivityTemplateService>();
 }
 public ApiCacheAttribute(Type modelType, bool preLoad = false)
 {
     _cacheService = GeneralContext.GetService <ICacheService>();
     _modelType    = modelType;
     _preLoad      = preLoad;
 }