void IMemberSearchesCommand.CreateMemberSearch(IUser owner, MemberSearch search) { search.OwnerId = owner.Id; search.Prepare(); search.Validate(); _repository.CreateMemberSearch(search); }
void IMemberSearchesCommand.UpdateMemberSearch(IUser owner, MemberSearch search) { if (!CanAccessSearch(owner, search)) { throw new MemberSearchesPermissionsException(owner, search.Id); } if (search.Criteria != null) { search.Criteria.Prepare(); } search.Validate(); _repository.UpdateMemberSearch(search); }