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 419183
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T18:45:08+00:00 2026-05-12T18:45:08+00:00

I’m looking for possible ways to persist the following classes. Subsonic SimpleRepository looks like

  • 0

I’m looking for possible ways to persist the following classes. Subsonic SimpleRepository looks like it might work, and people have said it should, when I asked a more general question.

But I’ve been unable to find a single example of how to do this – or at least one I could understand.

Can anyone point me to an example, or tell me how I could use Subsonic to map the following classes to a database?

Note that I haven’t designed the database – I’m hoping Subsonic will do that for me, lazy sod that I am…

Edit: Just to expand on the previous point – I’m hoping to have Subsonic convert my object model to a relational DB, dealing with all the Parent-Child and One-To-Many relationships that are implied. Currently, I don’t think Subsonic can do this. But even a working example (not a code fragment) that explicitly managed foreign keys, etc in the object model would be useful.

Some background and notes on the classes I want to persist:

  • they are used by the software that controls some measuring equipment
  • the Data class contains an array of RunData objects called
    RunFn, which holds the data for up to
    10 individual measurement runs
  • note that RunData also contains an array
    of floats – RawY
  • if necessary, we can change the arrays to some other type of collection (List<>, etc)
  • developing in C#, VS2008, for SQL Server Express

Edit: I’m using Subsonic 3.0.0.3.

public class RunData

{
    public DateTime StartDateTime { get; set; }
    public TimeSpan ElapsedTime { get; set; }

    private float[] _rawY;
    public float[] RawY
    {
        get
        {
            return _rawY;
        }
        set
        {
            _rawY = value;
        }
     }
 }

public Data
{
    public string OperatorId { get; set; }
    public string SampleId { get; set; }

    // CAN SUBSONIC DEAL WITH THIS ARRAY OF OBJECTS???
    private RunData[] _runFn;
    public RunData[] RunFn
    {
        get
        {
            return _runFn;
        }
        set
        {
            _runFn = value;
        }
    }
}
  • 1 1 Answer
  • 2 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-05-12T18:45:09+00:00Added an answer on May 12, 2026 at 6:45 pm

    To answer my own question…

    Despite some other postings I found which imply that Subsonic SimpleRepository can automatically generate a relational schema from an object model, this turns out NOT to be the case. See Rob Conery’s answer to this question:

    relationships-and-lazy-loading-in-subsonic-3-0

    He’s working on it, however, and it will probably be well worth the wait.

    In the meantime, I’ve looked at Fluent NHibernate, and this does what I want right out of the box. Their source code download has a demo project called Examples.FirstProject which demonstrates the functionality I’m looking for. Their documentation seems to be much more mature as well.

    However, NHibernate also appears more complex overall, so it will be interesting to see what develops with Subsonic.

    Edit: Heres a useful link that shows how to mangage foreign keys yourself in SimpleRepository –

    subsonic-3-simplerepository

    Have not tried it myself, but looks like it would actually work.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a jquery bug and I've been looking for hours now, I can't
I would like to run a str_replace or preg_replace which looks for certain words
I have an autohotkey script which looks up a word in a bilingual dictionary
I have a text area in my form which accepts all possible characters from
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,

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.