Questions tagged [subsonic3]

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 development cycle.

SubSonic is an open source project designed to act as a data access layer in your application. It was originally conceived by Rob Conery.

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 development cycle.

Our focus is that you have better things to do with your time than worry about data access. It's a problem - we understand. But we're here to help with the addiction.

The main project website is located at http://subsonicproject.com/.

557 questions
4
votes
1 answer

Subsonic:SimpleRepository Parent Child relationship

I am trying to use the SimpleRepository feature in Subsonic3 - first of all, I must say a big thanks to RobC - Subsonic really rocks, and I can't wait to see additional updates to the SimpleRepository. I am a big fan of the migration approach…
A J
4
votes
2 answers

How do I pass constructor arguments with dependency injection using Castle.Windsor?

I am wiring up my first SubSonic 3 application (in an ASP.NET MVC 1.0 front-end) and am looking at Rob's SimpleRepository. I'm using Castle.Windsor as an injection framework. In my application startup, I configure Castle to bind a SubSonic…
nkirkes
  • 2,635
  • 2
  • 21
  • 36
4
votes
1 answer

SubSonic 3 SimpleRepository One-to-many

How do I handle relations in SubSonic 3 using SimpleRepository? E.g: Having Author and Book (see below) I want the assigned Author to be persisted when the Book is persisted. [Serializable] public class Book { public int Id { get; set; } …
Daniel
  • 8,133
  • 5
  • 36
  • 51
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
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
4
votes
3 answers

Subsonic 3 Simple Repository And Transactions

So this is what I have so far. Am I doing something wrong or is there a bug in 3.0.0.3? var Repository = new SimpleRepository("DBConnectionName"); using (TransactionScope ts = new TransactionScope()) { using…
Chris Kolenko
  • 1,020
  • 17
  • 32
4
votes
1 answer

SubSonic 3 and Linq Parameterized Queries

We are currently using SubSonic 3.0.0.2 and playing about with the Linq for it, we've noticed that the underlying SQL is not parameterized. I'm aware that the query tool is and we can work with that but I'm just curious if having parameterized with…
TWith2Sugars
  • 3,384
  • 2
  • 26
  • 43
3
votes
1 answer

Profiling Subsonic SQL with MvcMiniProfiler

Anybody had any success in profiling their Subsonic sql queries with MvcMiniProfiler? I can't seem to find exactly where in Subsonic to hook into the SqlConnection creation…
pwhe23
  • 1,196
  • 1
  • 14
  • 15
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
3
votes
2 answers

Transaction and ASP.NET Membership API

Hope someone of you have been there. I need to do some database stuff which involve multiple tables. I am using SubSonic 3 SimpleRepository to update/access records. Now in between calls to update tables I am calling System.Web.Security.Roles…
TheVillageIdiot
  • 40,053
  • 20
  • 133
  • 188
3
votes
2 answers

SubSonic not recognizing SQLite foreign keys

I'm using SubSonic 3.0.0.3 and I can't seem to get the ActiveRecord .tt files to recognize and generate code for the foreign keys and relationships in my SQLite database. I think it generates everything else just fine, but after looking at other…
1
2
3
37 38