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