subsonic

SubSonic: MySqlDataReader closes connection.

I am using SubSonic 2.1 and entcountered a problem while executing a Transaction with SharedDbConnectionScope and TransactionScope. The problem is that in the obj.Save() method I get an "The connection must be valid and open" exception I tracked down the problem to this line: // Loads a SubSonic ActiveRecord object User user = new Use...

SubSonic IQueryable To String Array

Hey All, I have decided to use SubSonic (v3.0) for the first time and thoroughly enjoy it so far however I seem to have stumbled and I am hoping there is a nice neat solution. I have a users, roles and joining table. SubSonic (ActiveRecord) generated an entity User for my users table. A property of User is UserRoles and is of the type...

SubSonic project history

I'm writing an essay about ORM and SubSonic and I'm looking for some details regarding the project history (initial release, milestones, etc). Anyone knows where I can find it? anyonce can give me a quick briefing? Thanks ...

SubSonic 2.x StoredProcedure parameter data types?

From what I can see, SubSonic 2.x stored procedure parameter data types can only be of type System.Data.DbType. Is there a quick way to add System.Data.SqlDbType so we can use System.Data.SqlDbType.Structured to pass tables - ultimately to TVP's? In this particular project, all data caller functions are accessed through StoredProcedu...

Editing tables with ASP.Net - Quick 'n Dirty

I have need to provide a way for users to edit tables in ASP.Net. The tables are simple (no master/detail relationships), but there are likely to be a lot of them. What's the quickest/simplest way to provide a view/edit interface to a table, even considering commercial options (but not Iron Speed Designer. That thing is ridiculously e...

Subsonic 3 ActiveRecord nested select for NotIn bug?

I have the following Subsonic 3.0 query, which contains a nested NotIn query: public List<Order> GetRandomOrdersForNoReason(int shopId, int typeId) { // build query var q = new SubSonic.Query.Select().Top("1") .From("Order") .Where("ShopId") .IsEqualTo(shopId) .And(OrderTable.CustomerId).NotIn...

SubSonic 2.x now supports TVP's - SqlDbType.Structure / DataTables for SQL Server 2008

For those interested, I have now modified the SubSonic 2.x code to recognize and support DataTable parameter types. You can read more about SQL Server 2008 features here: http://download.microsoft.com/download/4/9/0/4906f81b-eb1a-49c3-bb05-ff3bcbb5d5ae/SQL%20SERVER%202008-RDBMS/T-SQL%20Enhancements%20with%20SQL%20Server%202008%20-%20Pra...

Subsonic ignoring TimeSpan property

For some reason the TimeSpan property on my class is not being persisted into the database by Subsonic it is simply being ignored!? All other properties are being saved OK. I am using SimpleRepository and RunMigrations, Subsonic v3.0.0.3. public TimeSpan Time { get; set; } Are TimeSpans not supported? ...

Why is SubSonic and ActiveRecord throwing an exception when updating a record? (Take 2)

I am experiencing the same error and stack trace as this question. However, I am using the latest code from github as of today (6/11/2010) and I am not having the compilation problems mentioned in the other answer. Other differences from the other poster: My class looks like this: public class ActiveRecordClass1 { private List<A...

Getting latest Subsonic builds

I need the latest Subsonic build or build it by my own. Subsonic project web site shows the latest available version is Subsonic v3.0.0.3 released at July 15, 2009. Questions: Are there any later builds - e.g. maintained by community members? If so, how can I get the latest one? In worst case I'm ready to get the latest source code an...

Subsonic class has reference to HttpContext.Current.User in a Windows app

Hello! I'm using SubSonic 2.1. I ran it against a database and it created all the files seemingly correctly. However, when I went to use one of the classes, the app wouldn't built. I'm making a Windows application, but in the SubSonic file there's a reference to HttpContext.Current.User. Does anyone know why that would happen? ...

Subsonic 3.0 Settings ttinclude for Oracle ?

Is there any subsonic settings.ttinclude template file for oracle db. ...

Subsonic. Ambiguous column name using Group By

Hi, I'm using subsonic 2.2 with .net 2.0 and I'm having an error when I included "Group By". Originally I had this code, and it worked perfectly: SqlQuery etResourceTitle = new Select(ResTitleOngoing.Columns.ResourceTitleID, ResTitleOngoing.Columns.ResourceTitle, ...

SubSonic 3 screws up selecteditem?

If you have a moment, please try this: -Download Subsonic 3. -Start a new proj and add SS's ActiveRecord templates. -Point it to any SQL Server DB and generate the classes. -Add a WPF project. -Create a window and add a combobox or listbox. -Set the ItemsSource from the SS DAL, and format it how you wish. -Add a button that will show ...

Subsonic ActiveRecord

I am trying to get Subsonic(3.0.0.4) to work(.Net 3.5 - VS2010), simple install that looks at the Northwind database using ActiveRecord. I used the 5 minute demo from http://subsonicproject.com/docs/The_5_Minute_Demo. I added the reference to the dll, un-blocked the T4 templates that I downloaded, changed the Settings.ttinclude to point ...

Subsonic updates multiple rows instead of 1 ????

Subsonic 3.0 is updating multiple rows instead of just the one it's supposed to DB Table is defined as follows - Col1 int NOT NULL Col2 Text NOT NULL Col3 INT NOT NULL ColX NTEXT COLY NTEXT Primary Key = Col1 + Col2 + Col3 .... the select expr is as follows myTable a = myTable.SingleOrDefault( x => x.Col1 = 1 && x.Col2 = 'a...

Subsonic Strips trailing s from Table Name in Object names

I have a table called Group_Focus and when we generated our code with Subsonic 2.2 it's calling the object GroupFocu while the files are named GroupFocu.cs and GroupFocuController.cs. Is there anyway to get it to not strip off the s when it builds the objects? I'm using the following settings in my Provider settings in the web.config: ...

Visual Studio hangs after I change any file in the App_Code

I have an issue with my visual studio. It was fine for a long time but now every time I make a change in the App_Code it freezes for some time. I checked the resources and it seems like it is compiling the website automatically. It didn't do that earlier and even if it did the studio would still work fine. Any thoughts how can I fix th...

Subsonic Command Timeout

Hello, Is there a way to set the command timeout for everything generated by subsonic? -Edward ...

SubSonic 3.0 LINQ Parameter Name Mismatch (Must Declare Scalar...)

I love SubSonic, but it continues to bite me in the @$$. I have bumped into LINQ projection problems that I have been able to work around but this latest error that seems to have "appeared" when I added a column to the insert list. For the sake of brevity I am not including the entire generated class here, but the relevant pieces are: ...