public void Seed(Model model) { if (model.Categories != null) { Categories.AddRange(model.Categories); } if (model.Products != null) { Products.AddRange(model.Products); } if (model.Regions != null) { Regions.AddRange(model.Regions); } if (model.Shops != null) { Shops.AddRange(model.Shops); } if (model.Customers != null) { Customers.AddRange(model.Customers); } if (model.Campaigns != null) { Campaigns.AddRange(model.Campaigns); } if (model.Sales != null) { Sales.AddRange(model.Sales); } if (model.LeadStates != null) { LeadStates.AddRange(model.LeadStates); } if (model.LeadHistory != null) { LeadHistory.AddRange(model.LeadHistory); } if (model.Budget != null) { Budget.AddRange(model.Budget); } if (model.RegionWiseSales != null) { RegionWiseSales.AddRange(model.RegionWiseSales); } if (model.Opportunities != null) { Opportunities.AddRange(model.Opportunities); } if (model.ProfitAndSales != null) { ProfitAndSales.AddRange(model.ProfitAndSales); } if (model.RegionSales != null) { RegionSales.AddRange(model.RegionSales); } SaveChanges(); }