Exemple #1
0
        public Case Post(CreateCaseDTO value)
        {
            if (!CaseType.isValidType(value.Type))
            {
                throw new ArgumentException("Invalid Case type");
            }

            return(caseService.createAndPersistAsync(value));
        }
Exemple #2
0
 public int GetCountByType(String type)
 {
     if (CaseType.isValidType(type))
     {
         return(CaseRepository.Instance.GetCountByTypeAsync(type));
     }
     else
     {
         throw new ArgumentException("Case type is invalid.");
     }
 }