示例#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;
        }
示例#2
0
 public void Create(Person person)
 {
     var newid = data.Keys.Count + 1;
     data.Add(newid, person);
 }