public int Execute() { IInstitute institute = instituteRepository.Get(instituteId); if (institute != null) { INoble noble = domainFactory.CreateNoble(title, institute.ID); nobleRepository.Add(noble); noble.AddObserver(nobleObserver); nobleId = noble.ID; return(0); } return(1); }