Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7755499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T12:35:04+00:00 2026-06-01T12:35:04+00:00

So im stuck on a few things in each part below, they are pretty

  • 0

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:

My Operation contract looks like this:

    [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; }
}

My service work looks like this:

[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)] 
public class RawDataService : IReceiveData
{

    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;
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T12:35:05+00:00Added an answer on June 1, 2026 at 12:35 pm

    1.Because GetGroupsCollection expects a TagName parameter, you’ll want to include that in your uri template:

    /whatever/{TagName}
    

    in order for it to be passed to the method when invoked by WCF REST. Uri Template (msdn)

    2.Your contracts look ok, but you don’t need names when the name is the same as the class/member name. .Net will figure this out for you. But it doesn’t hurt…

    3.Your service has to be pulling data from somewhere, right? For now, you could simply new up a collection of Groups to use for testing and return that. Database connections, ORM, etc. are probably beyond the scope of this question.

    This should generate enough to play with:

    var tempGroups = new[]{
        new Group { 
            Name = "Hello", 
            Tags = new[] { 
                new Tag { Name = "Tag1"}, 
                new Tag { Name =  "Tag2"}
            }
        },
       new Group { 
            Name = "World", 
            Tags = new[] { 
                new Tag { Name = "Tag1"}, 
                new Tag { Name = "Tag2"}
                new Tag { Name = "Tag3"}
            }
        }
    };
    

    Just replace _program.Groups with tempGroups.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I try to understand a few things in Cocoa but I got stuck on
I'm using LINQTOSQL and have just discovered I'm stuck with storing things in one
So, I am in this little predicament where I am stuck watching a few
For a few days Im being stuck at this problem, I've tried to delete/clean
since a few days I am stuck with a Test for one of my
Sorrry guys, I'm stuck here. I have a few grids, I also have CollectionViewSource
I have tried to figure this out and googled through a fair few stack
I know there are a few questions on stack already regarding this, and I
I know a few differences, Value types are stored on the stack where as
I've been stuck in a MsSql/MySql world now for a few years, and I've

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.