subsonic

What do I need to subclass Migration?

I'm following the Migration video posted at http://subsonicproject.com/docs/Using_SimpleRepository I've downloaded the latest SubSonic (3.0.0.4), and extracted/referenced the SubSonic.Core.dll in my empty Console Application project in VS 2010. I've created a 001_Init.cs file in the Migrations folder: using System; using System.Collec...

What happen to Subsonic...seen like no futhere development....

It has been a long time since Subsonic have stopped at version 3. Any new development going on? Thanks ...

SubSonic 3.0 translate dates to UTC

Is there a way in subsonic 3.0.0.4 using the ActiveRecord scheme to automatically translate dates to and from UTC so that my database will have dates in UTC, but the users will see local time? I've read about a 'useUtc' config option, but it looks like this doesn't exist in version 3. What is the best way to do this in version 3? ...

LINQ GroupBy month

I am having trouble getting an IQueryable list of a (subsonic) object grouped by Month and Year. Basic view of the object... public partial class DatabaseObject { [SubSonicPrimaryKey] public int objectID { get; set; } public string Description { get; set; } public decimal Value { get; set; } public string Categor...

.NET BackgroundWorker and SQLTransactions

Hi, Where can I find information or how can I handle SQL Server transactions in a BackgroundWorker thread? It's my understanding that error handling should not be set in the "DoWork" event and that the error is handled internally and passed to the 'RunWorkerCompleted". I am currently using SubSonic as my DAL and passing some lengthy ins...

Get item and all related tags with one query

I have the following tables structure: Item: Id, Description Tags: Id, TagName ItemXrefTag Id, TagId, ItemId What is the best way to read all the items related to some tag and all other tags, related to the items, to be able to display list of items and all the tags related to the item? If it's not clear I`...

Subsonic3 and ASP.NET MVC: Is there something like DataContext.GetTable<T>?

Right now I'm working my way thru the SportsStore exercise of Sanderson's "Pro ASP.Net MVC 2 Framework" book (page 107) and the exercise has me implementing a Repository pattern backed by a DB store using LINQ-to-SQL. I'm trying to figure out how to implement this same repository with the Subsonic ORM. The basic repository code is as fo...

Why isn't IsLoaded set to true upon Save()?

var user = new User() { Username = "a", Password = "b", }; user.Save(); Console.WriteLine(user.ID) // prints "504" Console.WriteLine(user.IsLoaded()) // prints "false" If the ID property is automatically set on Save(), I would expect IsLoaded() to also be set (to true). Why is it my responsibility to call user.SetIsL...

SubSonic 3, build dynamic or expression at runtime

I have a situation where I have to dynamically build a linq query based on user selections. If I had to dynamically generate sql I could do it this way: var sb = new StringBuilder(); sb.AppendLine("SELECT * FROM products p"); sb.AppendLine("WHERE p.CategoryId > 5"); // these variables are not static but ...

many to many relationships - can anyone explain how Subsonic 2.2 handles this

Hi I have a link table to link users to qualifications and I am trying to work out if there is any special way subsonic handles this. I have found this page in the documentation but it doesn't explain what it actually does. I know I can do a query as such: QualificationsCollection col = DB.Select().From<Qualification>() .InnerJo...