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

  • Home
  • SEARCH
  • 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 7797443
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T23:41:07+00:00 2026-06-01T23:41:07+00:00

I am using Subsonic ORM by Rob Connery with Backbone.Js to build javascript single

  • 0

I am using Subsonic ORM by Rob Connery with Backbone.Js to build javascript single page demonstration application. in one of the service end point there is a contract that send all the records existing in the data source like below

[WebMethod]
[ScriptMethod(UseHttpGet = true)]
public TaskCollection GetAllTasks()
{
    TaskCollection coll = new TaskCollection();
    coll.Load();
    return coll;
}

but seems that each Task in the collection is polluted with loads of properties that are required only on server side. This is the JSON returned on request

[{
    "__type": "DAL.Task",
    "Taskid": 1,
    "Taskname": "welcome to india",
    "Createdon": "\/Date(1334591056903)\/",
    "Modifiedon": "\/Date(1334591056903)\/",
    "ValidateWhenSaving": true,
    "DirtyColumns": [],
    "IsLoaded": true,
    "IsNew": false,
    "IsDirty": false,
    "TableName": "task",
    "ProviderName": null,
    "NullExceptionMessage": "{0} requires a value",
    "InvalidTypeExceptionMessage": "{0} is not a valid {1}",
    "LengthExceptionMessage": "{0} exceeds the maximum length of {1}",
    "Errors": []
}]

all i require is CreatedOn,ModifiedOn and TaskName, TaskId . How do i make sure only these are sent down the wire using SubSonic ORM

  • 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-01T23:41:08+00:00Added an answer on June 1, 2026 at 11:41 pm

    Here’s a couple of ideas…

    Use the viewmodel to autoselect the properties:

    public class TaskView
    {
        public int TaskID { get; set; }
        public string TaskDescription { get; set; }
    }
    ...
    var results = new Select().From(Tables.Task).ExecuteTypedList<TaskView>();
    

    Use an anonymous type

    var qry = new Select(new string[] { Task.Columns.TaskID, Task.Columns.TaskDescription }).From(Tables.Task);
    var resultList = new List<object>();
    using (IDataReader rdr = qry.ExecuteReader())
    {
        while (rdr.Read())
            resultList.Add(new 
            {
                TaskID = rdr[0].ToString(),
                TaskDescription = rdr[1].ToString(),
            });
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So, we're using SubSonic as our DAL/ORM for one of our projects. Everything has
I'm looking at using Subsonic with a multi-tenant ASP.net web application. There are multiple
We use SubSonic as an ORM of sorts(really more of a query-helper). For one
I am using subsonic to access my DB in a mvc application. When trying
I've been using SubSonic.Query all these while, until one day when I can't do
I'm interested in using Subsonic 3.0 for developing a new ASP.Net MVC application that
I'm just fooling around with the subsonic ORM for the first time. I'm using
I am using the SubSonic SimpleRepository template for my application. I have created an
In an ASP.NET app (using framework 2.0), and the ORM for this application is
I am developing MVC 3 application and its first time i am using subsonic.

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.