Exemplo n.º 1
0
        public List<string> Create(Person person)
        {
            var errorList = new List<string>();
            var existingPerson = this.accountRepository.GetUserByEmail(person.EmailAddress);

            if (existingPerson != null)
            {
                errorList.Add("User already exists");
                return errorList;
            }

            //Other business logic that might do checks and return errors

            this.accountRepository.Create(person);

            return errorList;
        }
Exemplo n.º 2
0
 public void Create(Person person)
 {
     var newid = data.Keys.Count + 1;
     data.Add(newid, person);
 }