subsonic

Subsonic Setup question using T4

I am sorry I have searched Stackoverflower for this one but can't find a problem similar... I changed the settings.tt file to point to my connection string and when I compile I get this: Error 2 Running transformation: System.ArgumentException: Format of the initialization string does not conform to specification starting at index 0. ...

subsonic ActiveRecord: Lambda Parameter not in scope.

Hi I am trying to delete list of albums from Album table. Following is the syntax but it fails saying "Lambda Parameter not in scope" Album.Delete(x => (ListOfIds).Contains(x.Id)); What am I missing here? Please advise. Thanks Pankaj ...

Is there a way to use T4 templates with a web site project?

Can T4 templates be used in a web site project? Or more specifically, can Subsonic be used in a web site project? I can run the .tt files in a web application project but it does not nothing on a web site project. I guess they need a solution/project environment in order to run? ...

Video from http://www.wekeroad.com/ss_setup2.html

Hi, I am very new to SubSonic I hit an error on Could not load type 'Subsonic.BuildProvider' from assembly 'Subsonic' The following is my code: <connectionStrings> <add name="Northwind" connectionString="Server=GITN-L3H8743\SQLINTSTANCE1;Database=testDB2;Integrated Security=true;" providerName="System.Data.SqlClient" /> ...

Subsonic - MySQL - Unsigned BigInt and bit issue

Well; I am using Unsigned BigInt(40) Auto Increment column as primary key. Whenever I try to query the table I am getting following exception: "Object of type 'System.UInt64' cannot be converted to type 'System.Int64'." When I dissected the code generated by Subsonic, it has declared the PK column as "long" instead of "ulong". Wh...

Subsonic null object reference

I have a site hosted on FastHosts servers with medium trust. I'm getting the following error every month or so, recycling the app by editing Web.config makes the problem go away but the client is not very happy about it. Any one have any ideas? Could it be down to a lost database connection? Seems unlikely as a recycle sorts it out. He...

SubSonic 2.2 + SharedDbConnectionScope

I have seen posts (first, second) on StackOverflow that say that SubSonic 2.2's SharedDbConnectionScope doesn't work with TransactionScope. Can we still rely on SharedDbConnectionScope in other contexts? I want to know if I should be concerned when using code such as the following (where ProviderName is not the default provider for ite...

Transaction : Delete related records from multiple tables using subsonic T4 templates?

Hi, Using templates, how can I delete related records from multiple tables in a transaction? Please advise. Thanks Pankaj ...

Subsonic - Filter by XML Column DataType

I have downloaded Subsonic 3.0.0.3 and I have a XML DataType in my MSSQL database. The property comes back as a string which is fine however how do I create a line of code to filter by contents in that column. If I try something like from x in Table.All() where x.XMLColumn.Contains("test") it throws an exception because although the p...

Subsonic : Can’t decide which property to consider the Key? foreign key issue.

Hi I am trying to select count of rows from a table which has foreign keys of two tables. The C# code threw the error mentioned below. So, I added a primary key column to the table (schema as follows) and regenerated the code. But still the same error is coming. Error : Can't decide which property to consider the Key - you can create o...

SQLite PRAGMA foreign_keys question

I've modified System.Data.SQLite to use a recent version of SQLite engine that automatically enforces foreign keys without using custom triggers. I'm also using SubSonic 2.x but this would apply to any ORM frameworks using SQLite that are 'open late close early'. How would you ensure that the statement 'PRAGMA foreign_keys=true' is ca...

Where is the latest revision of subsonic 3?

When I click the big download button at http://github.com/subsonic/SubSonic-3.0 I don't know what version I'm getting. On the download panel there are 3 additional versions listed for download. Which is the most recent, the default or 3.0.0.3? And does the big download button get me everything for that version? ...

SubSonic 3 Repository - SQLite In-Memory

Before I invest the time in modifying the SubSonic 3 source, I figured I ask to see if I'm missing something simple. Is it possible to use the SubSonic 3 Repository with migrations on a SQLite In-Memory database? I couldn't find a way to force the DbDataProvider to keep the connection open so the In-Memory SQLite database doesn't vanish...

How do I setup my POCO's with Subsonic 3 and the SimpleRepostitory? or where is the convention?

Is there someplace that details how to setup your POCO's when using the SimpleRepository with SubSonic 3? It sounds like it's convention over configuration, but I can't find where that convention is explained. http://www.subsonicproject.com/docs/Conventions looks like it was meant for 2.0, and is also marked incomplete. (BTW: I'd lov...

problem with delete when multiple columns

hiya when deleteing this works: orderitems.Delete(x => x.orderitem_sessionid == transkey); however this does not work orderitem.Delete(x => x.orderitem_sessionid == transkey && x.orderitem_productid == 6); i get no errors, but nothing is deleted either, i have working code as a substitute of var Deleteable...

Subsonic 3 transaction

Hi, I have DTC configured as outlined on MS website to support for remote transaction. I have the following code always giving me error. using (TransactionScope ts = new TransactionScope()) { Category c = new Category(); c.Name = "Cat1"; c.Save(); Product p = Product.SingleOrDefault(x=>x.ProductID==1); p.Title = "new ti...

Change Oracle Schema at runtime when using SubSonic

In my project, I am using Oracle Database and SubSonic for DAL. I have a problem with SubSonic and Oracle Schema, that is: When developing, I used a schema DEV in Oracle Database and generate DAL using SubSonic. After that when release to customer, he used a new schema TEST in Oracle Database and changed the connection string in app.co...

SubSonic3 StoredProcedures.tt & SQLServer.ttinclude

In the template to get the stored procedures I see this line if(spType=="PROCEDURE" &! sp.Name.StartsWith("sp_")){... Why can't the sp's start with sp_? ...

Question about Northwind DB example

When messing with the Subsonic 3.0 Northwind stuff: var product = Product.SingleOrDefault(x => x.ProductID == 1); I found the following was possible, but not workable) using intellisense: var product = Product.SingleOrDefault(x => x.OrderDetails == 1); OrderDetails as a member of Product, is an IQueryable. I guess I'm new to LINQ,...

Subsonic with VistaDB?

Is it possible to use Subsonic with VistaDB? I see it as a supported database for Subsonic 3 on the project website, But can't find a T4 template for it? Will I need to use SR or I can use AR? Vikas ...