public IActionResult DeleteElementType(int typeId) { var isSuccessful = _elementRepository.DeleteElementType(typeId); if (!isSuccessful) { return(BadRequest("Element type used on elements")); } return(Ok()); }