public void SubmitTypeForm(BookTypeEntity bookTypeEntity, int?keyValue = null) { try { if (keyValue == null) { type.Insert(bookTypeEntity); } else { bookTypeEntity.ID = keyValue.Value; type.Update(bookTypeEntity); } } catch (Exception ex) { throw; } }
public void Edit(Guid id, BookType bookType) { bookType.ID = id; _bookTypeRepository.Update(bookType); }