WCF/REST return group associated with tags
So im stuck on a few things in each part below, they are pretty trivial to most of you on stack so just wondering if I can get help with three issues I have in the below code segments the issues I have are:

> 1) **Operationcontract** for **GetGroupCollection** I dont know what
> goes in my UriTemplate as there is the string TagName in it?
> 
> 2) The second issue is my **datacontracts** am I missing
> **datamember** headers for anything? 
> 
> 3) The last issue I have is the **GetGroupCollection** in my
> `RawDataService : IReceiveData` I am not sure what goes in the line
> _program.Groups.


My Operation contract looks like this:

        #region GET
        [OperationContract]
        [WebInvoke(Method = "GET", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Xml, ResponseFormat = WebMessageFormat.Xml, UriTemplate = "")]
        List<Student> GetStudentCollection();
        [OperationContract] //not sure what to put for my uri template string?
        [WebInvoke(Method = "GET", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Xml, ResponseFormat = WebMessageFormat.Xml, UriTemplate = "")]
        List<Group> GetGroupsCollection(string TagName);
        [OperationContract]
        [WebInvoke(Method = "GET", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Xml, ResponseFormat = WebMessageFormat.Xml, UriTemplate = "")]
        List<Tag> GetTagCollection();
        #endregion 

My datacontracts look like this:

    [DataContract(Name="Student")]
    public class Student
    {
        [DataMember(Name = "StudentID")]
        public string StudentID { get; set; }
        [DataMember(Name = "FirstName")]
        public string FirstName { get; set; }
        [DataMember(Name = "LastName")]
        public string LastName { get; set; }
    }
    [DataContract(Name = "Group")]
    public class Group
    {
        
        public Group() // not sure if this has to have a datamember
        {
            Tags = new List<Tag>();
        }
        [DataMember(Name = "GroupName")]
        public string Name { get; set; }
        public List<Tag> Tags { get; set; } // datamember or not?

    }
    [DataContract(Name = "Tag")]
    public class Tag
    {
        [DataMember(Name = "TagName")]
        public string Name { get; set; }
    }

My service work looks like this:
       
    [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)] 
    public class RawDataService : IReceiveData
    {
        #region Lists
        List<Student> students = new List<Student>();
        List<Group> groups = new List<Group>();
        List<Tag> tags = new List<Tag>();
        #endregion 

        #region Do Work
        public void AddStudent(Student student)
        {
            students.Add(student);
        }
        public void AddGroup(Group group)
        {
            groups.Add(group);
        }
        public void AddTag(Tag tag)
        {
            tags.Add(tag); 
        }
        public List<Tag> GetTagCollection()
        {
            return tags;
        }
        public List<Student> GetStudentCollection()
        {
            return students;
        }
        public List<Group> GetGroupsCollection(string TagName)
        {
            List<Group> groups = (from g in _program.Groups // _program does not exist notsure what goes here
                                  where
                                      (from t in g.Tags where t.Name == TagName select t).Count() > 0
                                  select g).ToList();
            return groups;
        }
WCF/REST return group associated with tags
===

So im stuck on a few things in each part below, they are pretty trivial to most of you on stack so just wondering if I can get help with three issues I have in the below code segments the issues I have are:

> 1) **Operationcontract** for **GetGroupCollection** I dont know what
> goes in my UriTemplate as there is the string TagName in it?
> 
> 2) The second issue is my **datacontracts** am I missing
> **datamember** headers for anything? 
> 
> 3) The last issue I have is the **GetGroupCollection** in my
> `RawDataService : IReceiveData` I am not sure what goes in the line
> _program.Groups.


My Operation contract looks like this:

        #region GET
        [OperationContract]
        [WebInvoke(Method = "GET", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Xml, ResponseFormat = WebMessageFormat.Xml, UriTemplate = "")]
        List<Student> GetStudentCollection();
        [OperationContract] //not sure what to put for my uri template string?
        [WebInvoke(Method = "GET", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Xml, ResponseFormat = WebMessageFormat.Xml, UriTemplate = "")]
        List<Group> GetGroupsCollection(string TagName);
        [OperationContract]
        [WebInvoke(Method = "GET", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Xml, ResponseFormat = WebMessageFormat.Xml, UriTemplate = "")]
        List<Tag> GetTagCollection();
        #endregion 

My datacontracts look like this:

    [DataContract(Name="Student")]
    public class Student
    {
        [DataMember(Name = "StudentID")]
        public string StudentID { get; set; }
        [DataMember(Name = "FirstName")]
        public string FirstName { get; set; }
        [DataMember(Name = "LastName")]
        public string LastName { get; set; }
    }
    [DataContract(Name = "Group")]
    public class Group
    {
        
        public Group() // not sure if this has to have a datamember
        {
            Tags = new List<Tag>();
        }
        [DataMember(Name = "GroupName")]
        public string Name { get; set; }
        public List<Tag> Tags { get; set; } // datamember or not?

    }
    [DataContract(Name = "Tag")]
    public class Tag
    {
        [DataMember(Name = "TagName")]
        public string Name { get; set; }
    }

My service work looks like this:
       
    [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)] 
    public class RawDataService : IReceiveData
    {
        #region Lists
        List<Student> students = new List<Student>();
        List<Group> groups = new List<Group>();
        List<Tag> tags = new List<Tag>();
        #endregion 

        #region Do Work
        public void AddStudent(Student student)
        {
            students.Add(student);
        }
        public void AddGroup(Group group)
        {
            groups.Add(group);
        }
        public void AddTag(Tag tag)
        {
            tags.Add(tag); 
        }
        public List<Tag> GetTagCollection()
        {
            return tags;
        }
        public List<Student> GetStudentCollection()
        {
            return students;
        }
        public List<Group> GetGroupsCollection(string TagName)
        {
            List<Group> groups = (from g in _program.Groups // _program does not exist notsure what goes here
                                  where
                                      (from t in g.Tags where t.Name == TagName select t).Count() > 0
                                  select g).ToList();
            return groups;
        }