public IList <string> GetGroupDetails(string name, string phoneNumber) { var key_exists = _groupsRepository.GetGroupKey(phoneNumber, name); if (key_exists == null) { throw new NullReferenceException("This group does not exist!"); } var group_members = _groupsRepository.GetGroupMembers(key_exists); IList <string> details = new List <string>(); string nume = "Name: " + name; details.Add(nume); string admin = "Admin: " + _userRepository.GetUserByPhoneNumber(phoneNumber).FirstName + " " + _userRepository.GetUserByPhoneNumber(phoneNumber).LastName; details.Add(admin); string number = "No of members: " + group_members.Count.ToString(); details.Add(number); return(details); }