subsonic

Weird strange things happening in repository record!

SubSonic 2.2. I use the repository record pattern, with a table "appointment" with an appointmentId as auto-incrementing int. I am trying to update it, but when I do update the fields with something totally different, dirty columns are always zero, and I get an exception. System.NullReferenceException: Object reference not set to an in...

GetTableSchema() inaccessible due to its protection level

trying to instantiate a Query in SubSonic using the below method (as it apparently does not require a trip to the DB like the other methods for constructing a Query object do), per Scott Kohl's excellent SubSonic documentation. Problem is, the generated code defines this method as private - not public. Is there a better way to do this?...

Downloading the SubSonic Starter Kit

Here's an easy one for you... perhaps. The SubSonic Starter Kit that is discussed on the SubSonicProject Site, is MIA. All links to DL it point to the now defunct CodePlex project. There appears to be no such DL on the Google Project Site. 10 bucks to the first person who can tell be where I can get the bits. Well, maybe not 10 buck...

saving Parent and childs

I have couple tables in my schema with PK and FK relationship. I have created the DAL using SubSonic generator. If I create new parent and its childs, how should I save both? separately or in one shot? e.g. Parent.Save(); ChildCollection.SaveAll(); I tried above, but it does not work because ChildCollection does not have its ...

Returning Multiple Collections in SubSonic

I have a Collection on Menu Sections which each contain a collection of Menu Items (it's a two-tier menu, simple stuff). Ideally I could deepload the MenuSection collection to grab the MenuItems atthe same time, but failing that, is there a way that I can return a separate Collection of each using only one database call via subsonic? Am ...

Get all deleted record

I'm looking for a way to get all records where deleted is set to true on a particular table. How might I accomplish this? Note: Using auto-generated class by SubSonic. Not T-SQL. ...

SubSonic: retrieving value of stored procedure OUT parameters

I love your tool. I have been using it a lot, but just today I ran into a problem... I wrote a stored procedure that returns some values via OUT parameters, but SubSonic does not seem to generate the out parametes of the stored procedure method. For example, for SPI like this: CREATE PROC dbo.MyProc @param1 int, @param2 int out, @param...

Subsonic : Same column name different tables

Hi, I have a query where I need to do a "Where" clause for two different columns in two different tables but subsonic creates the same parametrized parameter name for both which is causing an issue. How can I fix this? string _RawSql = new Select() .From(Tables.Table1) .InnerJoin(Tables.Table2) .InnerJoin(Table3.SidColumn, Table2...

Subsonic custom collection type

Hi guys, This may seem like a simple question however i've spent the last hour trying to solve this. I want to create a custom subsonic collection so that i can fill it with data from a query with multiple joins using the .ExecuteAsCollection<>(); method. i've created the custom class and a custom collection and even a controller with...

Using TransactionScope with MySQL and Read Lock

I have the following situation: If have a MySQL db with a InnoDB table which I use to store unique numbers. I start a transaction, read the value (eg. 1000471), store this value in another table and update the incremented value (100472). Now I want to avoid that somebody else even reads the value while my transaction is running. If I w...

Subsonic version

I've got the 2.2 version of Subsonic but the SubSonic.dll is versioned as 2.1.1.0 is that fine? Thanks ...

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' SET @b = 0 ELSE SET @b = 1 RETURN (@b) END GO Being very new (days!) to SubSonic -...

Appenwith and

Hi guys, My company's MySql database is riddled with fields named "system", so SubSonic's generated code clashes with the .NET System namespace. I understand AppendWith appends a character(s) to the fields it indentifies as clashing with reserved words, but it doesn't seem to do anything in my case. Is there a way to see/update the lis...

Is there a way to force the refresh the meta model, which SubSonic builds after a DDL change in the DataBase

E.g. when I add a new table it does not appear in the Northwind namespace untill I remove the project folder from : C:\Users\userName\AppData\Local\Temp\Temporary ASP.NET Files\ or add and readd the SubSonic.dll I have the following configuration : <configSections> <section name="SubSonicService" type="SubSonic.SubSonicSe...

SubSonic.SqlQuery incorrectly generated when using Where()

I am using version 2.1 of SubSonic. I am trying to build to build a relatively simple query where I get a list of Roles for a User using UserId as a parameter. (UserId is a string...) SubSonic.SqlQuery sel = new SubSonic.Select().From(Data.Tables.Role).InnerJoin(Data.Tables.UserRole, Data.UserRole.Columns.RoleId, Data.Tables.Role, Data....

Subsonic + Sqlite + Float datatype == "Can't save: xxx exceeds the maximum length of 8"

I'm building a data loader utility application (Win 7 64bit, VS 2008, C#, .Net 3.5, Win Forms) using Subsonic 2.2. I've gotten everything working using SqlServer and now I need to get it working in Sqlite 3. I've worked through some issues but there is one I cannot resolve; I have 2 columns, Latitude and Longitude that are FLOAT data ...

Subsonic 2.2 + MySql 5 + StoredProcs = 'SPs' is not a member of 'SubSonic'?

Hey All, I have been using SS2.1 for quite a while now and have been loving it. However, I noticed that 2.2 was out so I thought it would be best to upgrade. After dropping 2.2 into my bin folder, it no longer builds the stored procedures from MySQL that were working so perfectly with v2.1. What happened? What am I missing here? On...

Subsonic dynamic query expression

Hi all, I am having a few issues with trying to live in a subsonic world and being a subsonic girl when it comes to subsonic expressions.... after reading http://stackoverflow.com/questions/765896/subsonic-query-conditiona-or-conditionb-and-conditionc it would appear i am not the only one with this sort of issue but hopefully someone (...

Subsonic 2.2 Source code

Where is the source code for subsonic 2.2? I can see the binary version of 2.2 but not the source code. ...

Web Service can't find SubSonic namespaces

Hi, I installed WebService in another computer,and I have tried to browse my WebService, it always come with Compiler Error,it cannot find all SubSonic's classes. Compiler Error Message: CS0246: The type or namespace name 'MyTableController' could not be found (are you missing a using directive or an assembly reference?) What should I ...