public int Add(INoble noble) { if (noble.ID == 0) { noble.ID = lastNobleId++; } nobles.Add(noble.ID, noble); return(noble.ID); }
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); }
public void Notify(INoble noble) { Console.WriteLine(noble.ID + ". " + noble.Title + " skill: " + noble.Skill + ", works published: " + noble.WorksPublished + "\n"); }