public void Execute() { IRepository repo = new InMemoryRepository(); Validate(repo); Member member = new Member(firstName, lastName, emailAddress); repo.AddMemberToGroup(member, groupId); }
public void Execute() { IRepository repo = new InMemoryRepository(); Validate(repo); Expense expense = new Expense(description, amount, owner); repo.AddExpenseToGroup(expense, groupId); }
public void Execute() { IRepository repo = new InMemoryRepository(); //Validate group prior to adding Validate(repo); Group group = repo.GetGroupByName(friendlyName); group = new Group(friendlyName); repo.AddGroup(group); }