Database Seeders - Comprehensive Reference Data
Overview
This directory contains comprehensive seeders that populate the database with real-world fishing data. All seeders are designed to be idempotent (safe to run multiple times).
Seeder Files
1. EnumLookupSeeder.cs
Purpose: Seeds all enum values into lookup tables for dynamic extensibility.
What it seeds:
- All enum types (30+ enums) into
LookupTableentries EnumToLookupMappingentries to track relationships- Sets
IsSystemDefined = truefor all seeded values
Usage: Called automatically by AppDbContextSeeder.Seed()
2. BrandSeeder.cs
Purpose: Seeds major fishing gear manufacturers and brand ownership history.
What it seeds:
- 50+ Brands including:
- Rod manufacturers (Shimano, Daiwa, St. Croix, G. Loomis, Fenwick, etc.)
- Reel manufacturers (Quantum, Pflueger, 13 Fishing, KastKing, etc.)
- Lure manufacturers (Rapala, Strike King, Zoom, Yamamoto, Z-Man, etc.)
- Line manufacturers (PowerPro, Sufix, Spiderwire, Seaguar, Sunline, etc.)
- Rod building components (Fuji, American Tackle, Pac Bay, Mud Hole)
- Electronics (Garmin, Lowrance, Humminbird, Raymarine)
- Accessories (Plano, Flambeau, Mustad, Gamakatsu, Owner)
- Brand Ownership History: Tracks acquisitions (e.g., Pure Fishing acquiring Berkley, Abu Garcia, Penn)
Methods:
SeedBrands()- Seeds all brandsSeedBrandOwnershipHistory()- Seeds ownership relationships
3. FishSpeciesSeeder.cs
Purpose: Seeds fish species with taxonomic classification.
What it seeds:
- Taxonomic Ranks: Kingdom, Phylum, Class, Orders, Families, Genera
- 20+ Fish Species including:
- Bass: Largemouth, Smallmouth, Spotted
- Sunfish: Bluegill, Redear Sunfish, Crappie
- Trout/Salmon: Rainbow Trout, Brown Trout, Brook Trout, Lake Trout
- Catfish: Channel, Blue, Flathead
- Pike: Northern Pike, Muskellunge, Chain Pickerel
- Other: Walleye, Red Snapper, Striped Bass
- Species Relationships: Links related species (e.g., Redear Sunfish -> Bluegill)
Methods:
SeedTaxonomicRanks()- Seeds taxonomic hierarchySeedFishSpecies()- Seeds fish species with full taxonomy
4. KnotSeeder.cs
Purpose: Seeds common fishing knots with properties and instructions.
What it seeds:
- 12+ Common Knots including:
- Line to Line: Double Uni, Blood Knot, Albright, FG Knot
- Line to Hook: Improved Clinch, Palomar, Uni Knot, Snell
- Loops: Perfection Loop, Surgeon's Loop
- Terminal: Bimini Twist
- Joining: Surgeon's Knot
- Each knot includes:
- Category, Difficulty, Strength percentage
- Use cases (LineToLine, LineToLeader, BraidToMono, etc.)
- Step-by-step instructions
5. RodGuideSeeder.cs
Purpose: Seeds rod guides from major manufacturers.
What it seeds:
- 15+ Guide Models from:
- Fuji: Alconite, Hardloy, SiC series (various sizes)
- American Tackle: ATLAS series
- Pac Bay: Alconite series
- Includes:
- Guide types (Stripper, Running, TipTop)
- Frame types (Single Foot, Double Foot, Ring Only)
- Ring materials (Alconite, Hardloy, SiC)
- Sizes (4, 5, 8, 10, 12, 16, 20)
- Micro guides
- Physical specifications (diameter, height, weight)
6. FishingSuperstitionSeeder.cs
Purpose: Seeds common fishing beliefs and superstitions.
What it seeds:
- 20+ Superstitions in categories:
- Weather: Rising/falling pressure, storms, wind direction
- Moon: Full moon, new moon, feeding periods
- Tide: Incoming/outgoing tide, slack tide, spring tides
- Time: Early morning, evening, midday
- General: Red lures, bananas, whistling, etc.
7. AchievementSeeder.cs
Purpose: Seeds achievements/badges for gamification.
What it seeds:
- 30+ Achievements in categories:
- Catches: First Catch, Century Club, Personal Best, Species Master
- Logs: Dedicated Logger, Consistent Angler, Year Round Angler
- Social: Social Butterfly, Popular Angler, Influencer
- Charter: Charter Explorer, Charter Regular, Charter Master
- Gear: Gear Collector, Rod Builder, Setup Master
- Location: Explorer, World Traveler, Local Expert
- Streak: Week Warrior, Month Master, Hundred Day Streak
- Special: Record Breaker, Early Adopter, Data Contributor
8. LureTypeSeeder.cs
Purpose: Seeds lure types with subtypes (expanded beyond crankbaits).
What it seeds:
- 10+ Lure Types with subtypes:
- Crankbait: Lipless, Square Bill, Round Bill, Deep Diving, Flat-Sided
- Spinnerbait: Single Blade, Double Blade, Tandem, Chatterbait
- Jig: Football, Arky, Flipping, Swim, Finesse
- Topwater: Poppers, Walkers, Prop Baits, Buzzbaits, Frogs
- Soft Plastic: Worm, Craw, Creature, Swim Bait, Grub, Lizard, Frog
- Jerkbait: Suspending, Floating, Sinking
- Spoon: Casting, Trolling, Jigging
- Spinner: In-Line, Spinner Rig
- Fly: Dry Fly, Wet Fly, Nymph, Streamer
- Swimbait: Hard, Soft
- Vibrating Jig: Chatterbait
- A-Rig: Alabama Rig
9. LineTypeSeeder.cs ⭐ NEW
Purpose: Seeds line types (monofilament, fluorocarbon, braid, etc.).
What it seeds:
- 11 Line Types:
- Monofilament: Single-strand nylon, stretchy, affordable
- Fluorocarbon: Nearly invisible, low stretch, abrasion resistant
- Copolymer: Blend of mono materials, less stretch
- Braid: Multi-strand, no stretch, high strength-to-diameter
- Wire: Metal wire for trolling and toothy fish
- Copper Core: Copper wire for Great Lakes trolling
- Lead Core: Lead wire for depth-specific trolling
- Fly Line: Specialized line for fly fishing
- Biodegradable: Environmentally friendly line
- Ice Line: Specialized for ice fishing
- Tenkara Line: Traditional Japanese fly fishing line
10. TagSeeder.cs ⭐ NEW
Purpose: Seeds common fishing tags for categorizing logs, gear, and techniques.
What it seeds:
- 100+ Common Tags in categories:
- WaterType (12): freshwater, saltwater, river, lake, ocean, ice, etc.
- Method (14): trolling, casting, jigging, fly-fishing, kayak-fishing, etc.
- Condition (10): clear-water, murky-water, shallow, deep, weedy, rocky, etc.
- Time (7): dawn, morning, midday, evening, night, sunrise, sunset
- Weather (8): sunny, cloudy, rainy, windy, calm, storm, cold, hot
- GearType (6): spinning, baitcasting, fly, conventional, ultralight, heavy-duty
- Technique (12): drop-shot, texas-rig, carolina-rig, wacky-rig, ned-rig, etc.
- Species (14): bass, trout, walleye, pike, muskie, salmon, steelhead, etc.
- Special (10): personal-best, record, first-catch, tournament, charter, etc.
11. ApparelSeeder.cs
Purpose: Seeds fishing apparel brands and items.
What it seeds:
- 20+ Apparel Brands: Simms, Huk, Aftco, Columbia, Patagonia, Grundens, etc.
- Sample Apparel Items: Shirts, waders, boots, gloves, ice suits, sunglasses, etc.
12. LanguageSeeder.cs
Purpose: Seeds language data and common translations (placeholder for future).
What it seeds:
- Currently a placeholder for future translation seeding
- Can be used to seed common translations for core entities
Usage
Running All Seeders
// In Program.cs or DbInitializer
using (var scope = app.Services.CreateScope())
{
var context = scope.ServiceProvider.GetRequiredService<AppDbContext>();
context.Seed(); // Calls all seeders
}
Running Individual Seeders
// Seed specific data
BrandSeeder.SeedBrands(context);
FishSpeciesSeeder.SeedFishSpecies(context);
KnotSeeder.SeedKnots(context);
LineTypeSeeder.SeedLineTypes(context);
TagSeeder.SeedTags(context);
Seeder Design Principles
- Idempotent: All seeders check if data exists before seeding
- Comprehensive: Seeds real-world data from reputable sources
- Extensible: Uses dynamic lookup tables where possible
- Organized: Each seeder focuses on one domain
- Documented: Each seeder includes comments explaining what it seeds
Data Sources
- Brands: Major manufacturers from fishing industry
- Fish Species: Common North American freshwater and saltwater species
- Knots: Standard fishing knots from fishing knot guides
- Guides: Product catalogs from Fuji, American Tackle, Pac Bay
- Superstitions: Common angler beliefs and traditions
- Achievements: Gamification patterns from fishing apps and games
- Line Types: Standard line types from fishing industry
- Tags: Common fishing terminology and categorization
Seeding Summary
Current Seeders ✅
- ✅ EnumLookupSeeder - All 30+ enums
- ✅ BrandSeeder - 50+ brands with ownership history
- ✅ FishSpeciesSeeder - 20+ species with taxonomy
- ✅ KnotSeeder - 12+ knots with instructions
- ✅ RodGuideSeeder - 15+ guide models
- ✅ FishingSuperstitionSeeder - 20+ superstitions
- ✅ AchievementSeeder - 30+ achievements
- ✅ LureTypeSeeder - 10+ lure types with subtypes
- ✅ LineTypeSeeder - 11 line types ⭐ NEW
- ✅ TagSeeder - 100+ common tags ⭐ NEW
- ✅ ApparelSeeder - 20+ brands and sample items
- ✅ LanguageSeeder - Placeholder for translations
- ✅ GearCategorySeeder - 24 gear categories (in AppDbContextSeeder)
Total Data Seeded
- Enums: 30+ enum types → LookupTable entries
- Brands: 50+ brands
- Fish Species: 20+ species with full taxonomy
- Knots: 12+ knots
- Guides: 15+ guide models
- Superstitions: 20+ beliefs
- Achievements: 30+ achievements
- Lure Types: 10+ types with subtypes
- Line Types: 11 types ⭐ NEW
- Tags: 100+ tags ⭐ NEW
- Apparel: 20+ brands, sample items
- Gear Categories: 24 categories
Future Enhancements
- Add more saltwater species (tuna, marlin, snapper varieties)
- Add historical brand data (discontinued brands, mergers)
- Add regional fish species (by state/province)
- Add more knot variations and specialty knots
- Add rod blank data from manufacturers
- Add line variant data (specific products)
- Add lure product data (specific models)
- Add common translations for core entities
- Add popular fishing locations (optional - might be user-specific)
Notes
- All seeders use
Any()checks to prevent duplicate seeding - Brand ownership history tracks real-world acquisitions
- Fish species include full taxonomic classification
- Knots include strength ratings and use cases
- Guides include physical specifications for rod building
- Superstitions can be analyzed against catch data for pattern verification
- Tags are normalized to prevent duplicates and enable better search
- Line types include descriptions of characteristics and use cases