//delete the commensalisme of the current plant(Liam) public void DeleteCommensalism(Commensalisme commensalism) { var selectedCommensalism = _context.Commensalisme.FirstOrDefault(s => s.Id == commensalism.Id); _context.Commensalisme.Remove(selectedCommensalism); _context.SaveChanges(); }
//add a commensalisme to the selected plant(Liam) public void AddCommensalism(Plant plant, string developmentSpeed, string strategy) { //sociabiliteit ontbreekt Commensalisme commensalism = new Commensalisme { PlantId = plant.PlantId, Ontwikkelsnelheid = developmentSpeed, Strategie = strategy }; _context.Add(commensalism); _context.SaveChanges(); }