public async void Put(Badge badge) { //if(badge.Tags == null) // badge.Tags = tags; _context.Badges.Add(badge); _context.SaveChanges(); }
public void Seed() { context.Database.EnsureDeleted(); context.Dens.AddRange(PredefinedData.Dens()); context.Icons.AddRange(PredefinedData.Icons()); context.Badges.AddRange(PredefinedData.Badges()); context.Ranks.AddRange(PredefinedData.Ranks()); context.Scouts.AddRange(PredefinedData.Scouts()); context.Leaders.AddRange(PredefinedData.Leaders()); context.ScoutBadges.AddRange(PredefinedData.ScoutBadges()); context.SaveChanges(); }