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)); }
public DepartmentCertificationType SaveNewCertificationType(string certificationType, int departmentId) { DepartmentCertificationType newCertType = new DepartmentCertificationType(); newCertType.DepartmentId = departmentId; newCertType.Type = certificationType; _departmentCertificationTypeRepository.SaveOrUpdate(newCertType); return(GetCertificationTypeById(newCertType.DepartmentCertificationTypeId)); }