I am trying to write a method that will delete a DB record by ID. However this method…
public Stuff? DeleteById(int id)
{
return _DbContext.Stuff.Remove(p => p.Id == id);
}
Gives this error: “Cannot convert lambda expression to type ‘Stuff’ because it is not a delegate type” I feel I’m missing something simple?