Esempio n. 1
0
        public GroupViewModel GetViewModel(int groupId, int userId)
        {
            if (!_groupMemberRepository.IsInGroup(groupId, userId))
            {
                throw new ArgumentException("You are not a member of this group");
            }

            var group = _groupRepository.Get(groupId);

            return(group.ToViewModel());
        }