public NutrientIntakeRepository(StorageTypeSetting.StorageTypes storageType) { switch (storageType) { case StorageTypeSetting.StorageTypes.SQL: _context = new ArticleContextSQL(); break; case StorageTypeSetting.StorageTypes.Memory: _context = new ArticleContextMemory(); break; default: throw new ArgumentOutOfRangeException(nameof(storageType), storageType, "Set Storage Type"); } }
public GoalLogRepository(StorageTypeSetting.StorageTypes storageType) { switch (storageType) { case StorageTypeSetting.StorageTypes.SQL: _context = new GoalLogsContextSql(); break; case StorageTypeSetting.StorageTypes.Memory: _context = new GoalLogContextMemory(); break; default: throw new ArgumentOutOfRangeException(nameof(storageType), storageType, "Set Storage Type"); } }
public UserRepository(StorageTypeSetting.StorageTypes storageType) { _storageType = storageType; switch (storageType) { case StorageTypeSetting.StorageTypes.SQL: _context = new UserContextSQL(); break; case StorageTypeSetting.StorageTypes.Memory: _context = new UserContextMemory(); break; default: throw new ArgumentOutOfRangeException(nameof(storageType), storageType, "Set Storage Type"); } }