public virtual void Remove(ModelType model) { using (var context = new Find3dPrintingDBContext()) { context.Set <ModelType>().Remove(model); context.SaveChanges(); } }
public virtual void Remove(int id) { ModelType modelToDelete = this.GetById(id); using (var context = new Find3dPrintingDBContext()) { context.Set <ModelType>().Remove(modelToDelete); context.SaveChanges(); } }