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