public void Delete(int id) { var audio = _engieContext.Audios.FirstOrDefault(x => x.Id == id); _engieContext.Remove(audio); _engieContext.Entry(audio).State = EntityState.Deleted; _engieContext.SaveChanges(); }
public void Excluir(int id) { var comando = _engieContext.Comandos.FirstOrDefault(x => x.Id == id); _engieContext.Remove(comando); _engieContext.Entry(comando).State = EntityState.Deleted; _engieContext.SaveChanges(); }