Beispiel #1
0
 public void Update(int?id, Component component)
 {
     if (read.GetById(id) == null)
     {
         throw new NotFoundComponentException();
     }
     update.Update(component);
 }
Beispiel #2
0
 public void Delete(int?id)
 {
     if (read.GetById(id) == null)
     {
         throw new NotFoundComponentException();
     }
     delete.Delete(id);
 }
Beispiel #3
0
 private Component GetComponent(int?idComponentWithError)
 {
     return(componenRepository.GetById(idComponentWithError) ?? throw new NotFoundComponentException());
 }