public void DeleteById(String personId) { var personPO = _personRepository.FindById(personId); var person = _personFactory.GetPerson(personPO); person.Disable(); _personRepository.Update(_personFactory.CreatePersonPO(person)); }
static void Main(string[] args) { // Start-up information System.Console.WriteLine("Starting client..."); System.Console.WriteLine("Current identity: " + WindowsIdentity.GetCurrent().Name); // Configure the remoting runtime RemotingConfiguration.Configure( AppDomain.CurrentDomain.SetupInformation.ConfigurationFile); // Instanciate the type try { IPersonFactory personCreator = RemotingHelper.CreateProxy(typeof(IPersonFactory)) as IPersonFactory; Person p = personCreator.GetPerson(); System.Console.WriteLine("Got the person: {0} {1} {2}", p.Firstname, p.Lastname, p.Age); System.Console.ReadLine(); } catch (Exception ex) { System.Console.WriteLine("Exception occured: " + ex.Message); } System.Console.WriteLine("Press key to stop..."); System.Console.Read(); }