Esempio n. 1
0
 void IMemberSearchesCommand.CreateMemberSearch(IUser owner, MemberSearch search)
 {
     search.OwnerId = owner.Id;
     search.Prepare();
     search.Validate();
     _repository.CreateMemberSearch(search);
 }
Esempio n. 2
0
        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);
        }