Example #1
0
        private void AddTestData(ToolBeltContext context)
        {
            context.Trades.RemoveRange(context.Trades);

            context.Trades.AddRange(
                new[]
            {
                "Roofing",
                "Siding",
                "Flooring",
                "Framing",
                "Dry-wall",
                "Tiling",
                "Masonry (stone work)",
                "Chimney",
                "Concrete",
                "Asphalt",
                "Remodeling (bathrooms)",
                "Remodeling (kitchens)",
                "Carpentry (finished)",
                "Carpentry (rough)",
                "Painting (interior)",
                "Painting (exterior)",
                "Plumbing",
                "Electrical",
                "Landscaping",
                "Appliance Installation",
                "Window Replacement",
                "Welding",
                "Decks",
                "Fencing",
                "Tile",
                "Kitchen Remodeling",
                "Bathroom Remodeling",
                "Concrete"
            }
                .Select((specialty, index) => new Data.Trade {
                Name = specialty
            }));

            context.SaveChanges();
        }
Example #2
0
 public TradesController(ToolBeltContext context)
 {
     _context = context;
 }