Questions tagged [subsonic]

SubSonic is A Super High-fidelity Batman Utility Belt that works up your Data Access (using Linq in 3.0), throws in some much-needed utility functions, and generally speeds along your dev cycle.

SubSonic 3.0 is the latest version of SubSonic and was released in June of 2009. Work on SubSonic 3.0 lasted close to a year, and revolved mostly around supporting LINQ.

The focus of SubSonic 3.0 is to provide tools, not guidance or an overall mindset/approach. There are a number of things in SubSonic that allow you to move faster while applying whatever patterning floats your boat. We're not as complete as NHibernate, but you'll work faster with less concept count. We're not as deep as Linq to SQL, but you can use our stuff on most databases.

1195 questions
4
votes
2 answers

Parent and Child object in SimpleRepository

How would it work in Subsonic's SimpleReporitory if I wanted to be able to have a 1 to many relationship between objects? Would I have to create a bridge object and then build my parent object at runtime, or is this support built in? What I am…
4
votes
2 answers

.NET - ORMs and all possible combinations - ViewModel?

How would you approach this problem with an ORM? This is a hypothetical (simplified) example: I have a table of cities: 1 - New York 2 - London 3 - San Francisco 4 - New Orleans I have a table of scores: (first column Unique Primary Key, second…
BuddyJoe
  • 69,735
  • 114
  • 291
  • 466
4
votes
3 answers

use subsonic 2.x and 3.x in the same project

Is it possible to mix them? I'm asking because I have a big project that uses Subsonic 2.x generated classes (in a compiled dll) but would like to start using 3.x for new stuff. I tried it last night with a project where I had references to both…
Gerry
4
votes
4 answers

How to intersept the save method on ActiveRecord on SubSonic ORM?

I need to intercept the Save method, do some validations, alter some properties and then let it go again normally. How can I do this? Thanks! Alex
AlexCode
  • 4,055
  • 4
  • 33
  • 46
4
votes
2 answers

SubSonic 3.0.0.2 Structs.tt

The error I'm getting seems to be coming out of the Structs.tt file. I'm using the Northwind db and only using the Products table (I excluded all other tables). I return Json(Product.All()). Here's the error: A circular reference was detected …
kntcnrg
  • 603
  • 3
  • 10
  • 17
4
votes
2 answers

Use subsonic 3.0 SimpleRepository to a existing database

I want to use subsonic 3.0 SimpleRepository in my project, but there is a problem : If my table's name like Product etc. then I can't get any data from database, because subsonic generate the sql statement like "Select * from Products ..." PS: I…
NEE
  • 143
  • 9
3
votes
4 answers

Subsonic: Bring me to tiers

This is an embarrassingly basic n-tier question. I've created a DAL project in VS2008 with subsonic. It's got a widget class, a widgetcollection class, and a widgetcontroller class. I've created my Business logic project (no I can't put it in the…
Cav
3
votes
2 answers

Subsonic: Tiers of a clown

I've got a nice DAL generated using Subsonic. Is there a way I can generate a skeleton for the BLL? I don't want to plug the SS layer directly into my GUI. I've trudged through both SS forums and it seems that everyone calls the SSS-generated layer…
Cav
3
votes
1 answer

Calling a Scalar Function from SubSonic

I've got a SQL Server function that returns a scalar BIT value and takes one parameter. The following gives you an idea: CREATE FUNCTION dbo.[fnTest] (@StringToTest VARCHAR(10)) RETURNS BIT AS BEGIN DECLARE @b BIT IF @StringToTest = 'A'…
thomasswilliams
  • 388
  • 2
  • 9
3
votes
1 answer

Subsonic transformations failing in T4 template due to same object name across different schemas

i have core T4 templates in subsonic to create my DAL. Connection strings which i have users which have selective access to different schemas in the database. problems arise when i try to generate my DAL partial classes for a user which has access…
nesh_s
  • 399
  • 4
  • 19
3
votes
2 answers

Using SubSonic in VB.Net web application

I am using Subonic in a VB.net application for the first time (I have used it succesfully in a WebSite project plenty of times). I followed the 2nd part of the 'Getting Started' video to actually generate the DAL source files as opposed to the…
Mike C
3
votes
1 answer

Deletion of multiple items in a collection bound to a datagridview takes forever

This is not a question, cause I already answerd it. But it may be helpful to others, too. Here's what happens: Create a WinForm with a Datagridview and bind a Subsonic ...Collection with more then 500 objects loaded to it Add some columns to the…
Jürgen Steinblock
  • 30,746
  • 24
  • 119
  • 189
3
votes
4 answers

Subsonic Query (ConditionA OR ConditionB) AND ConditionC

How do I build a query in Subsonic that of this format (ConditionA OR ConditionB) AND ConditionC Iv tried various approaches but I cant seem to get the desired result. Here is one thing i tired: Query q = Challenge.CreateQuery(); …
Dan
  • 29,100
  • 43
  • 148
  • 207
3
votes
1 answer

How do I return data from joined tables through subsonic's objects?

I'm using ActiveRecord on Subsonic 3 and I effectively want to do this: select * from foo left outer join bar on bar.Id = foo.barId where foo.someProperty = 2 I've written a stored procedure to fetch the data but Subsonic has only created…
Gareth
  • 624
  • 3
  • 10
  • 26
3
votes
1 answer

Subsonic 3: Calling Stored Procedures as functions in ASP.NET 4

It seems that the only way to call an Sp with Subsonic 3 is as follows: StoredProcedure sp = new StoredProcedure("NameOfSP"); mySqlCommand.Parameters.Add("@MyVar", SqlDbType.Int).Value = 1; I remember some time ago that it was possible to call a…
Jason
  • 1,129
  • 1
  • 9
  • 20