public Case Post(CreateCaseDTO value) { if (!CaseType.isValidType(value.Type)) { throw new ArgumentException("Invalid Case type"); } return(caseService.createAndPersistAsync(value)); }
public int GetCountByType(String type) { if (CaseType.isValidType(type)) { return(CaseRepository.Instance.GetCountByTypeAsync(type)); } else { throw new ArgumentException("Case type is invalid."); } }