internal Lego Delete(int id) { Lego foundLego = GetById(id); if (_repo.Delete(id)) { return(foundLego); } throw new Exception("Something bad happened..."); }
internal string Delete(int id) { var exists = _repo.GetById(id); if (exists == null) { throw new Exception("Invalid Id"); } _repo.Delete(id); return("Successfully Deleted"); }