Example #1
0
        public async Task <DepartmentCertificationType> SaveNewCertificationTypeAsync(string certificationType, int departmentId, CancellationToken cancellationToken = default(CancellationToken))
        {
            DepartmentCertificationType newCertType = new DepartmentCertificationType();

            newCertType.DepartmentId = departmentId;
            newCertType.Type         = certificationType;

            return(await _departmentCertificationTypeRepository.SaveOrUpdateAsync(newCertType, cancellationToken));
        }
Example #2
0
        public DepartmentCertificationType SaveNewCertificationType(string certificationType, int departmentId)
        {
            DepartmentCertificationType newCertType = new DepartmentCertificationType();

            newCertType.DepartmentId = departmentId;
            newCertType.Type         = certificationType;

            _departmentCertificationTypeRepository.SaveOrUpdate(newCertType);

            return(GetCertificationTypeById(newCertType.DepartmentCertificationTypeId));
        }