Example #1
0
        public ActionResult AddPerson()
        {
            /*Get new Person template*/
            IDataRepositoryModel DRM = new DataRepositoryModel();

            return(View(DRM.Add()));
        }
Example #2
0
        public ActionResult AddPerson(PersonEntity P)
        {
            /*Add Person*/
            IDataRepositoryModel DRM = new DataRepositoryModel();
            var personManager        = new PersonManager();
            var savePersonRules      = new SavePersonRules();

            savePersonRules.AddRule(new CanSavePerson(P));
            personManager.AddPerson(P, DRM, savePersonRules);
            return(View(DRM.Add()));
        }