public Indhold Update(Indhold indholdChanges) { var indhold = context.Indholds.Attach(indholdChanges); indhold.State = Microsoft.EntityFrameworkCore.EntityState.Modified; context.SaveChanges(); return(indholdChanges); }
public Indhold Delete(int id) { Indhold indhold = context.Indholds.Find(id); if (indhold != null) { context.Indholds.Remove(indhold); context.SaveChanges(); } return(indhold); }
public Indhold Create(Indhold indhold) { context.Indholds.Add(indhold); context.SaveChanges(); return(indhold); }