subsonic

T4 Templates - SubSonic 3 - Running at Build Time

How do you get the SubSonic 3 T4 templates to rerun prior to building in VS2008? I don't have to continually "Run Custom Tool" on each one? ...

Subsonic 2.1 fail to do an inner join on column has ON DELETE CASCADE trigger set up

Hi All, I am having problem to do inner join on column has ON DELETE CASCADE trigger set . I am not sure this is a bug, wondering if anyone has seen it. EX : query = query.InnerJoin(Addendum.Schema.Columns.GetColumn("ProductId"), Product.Schema.Columns.GetColumn("Id")) It is just a simple inner join, it doen't work if "ProductId" colu...

SubSonic 3 ActiveRecord Issues - Blank Data

When I examine the .Columns property of one of my business entities I had missing values for Table and PropertyName. I get the right count of records back from things like Take(5) but all 5 objects will be full of empty strings and 0 values. Just tried it with another SQL connection and same thing? Where should I start troubleshooting t...

Subsonic 3.0 error running ActiveRecord template with SQLite

I've followed the Using ActiveRecord quick tutorial on the website, substituting SQLite in the settings.ttinclude and in the templates themsevles, and when I run custom tool, I get this error: Error 1 Compiling transformation: Metadata file 'System.Data.SQLite' could not be found C:\testapp\test.dal\ActiveRecord.tt 1 1 I have a refe...

SubSonic 3 Linq Join Problems

using the linqtemplates, I tried getting the linq syntax close to what is in the docs var query = from c in db.CountyLookups join s in db.StateLookUps on c.StateLookupID equals s.StateLookupID where c.Name2 == countyName && s.Abbr == stateAbbr select new { Latitude = c.Latitude, Longitude...

Simple subsonic sp question

Trying to get started with subsonic but have a simple question about stored procedures - just can't seem to understand the context of the examples i've seen, like this one: SubSonic.StoredProcedure sp = SPs.CustOrderHist(customerID); GridView1.DataSource = sp.GetReader(); In this line, what is this object SPs? can't seem to find it......

What is the difference between Add and Update in SubSonic3 SimpleRepository?

What is the difference between IRepository.Add and IRepository.Update in SubSonic3 SimpleRepository? ...

TransactionScope, Selects using Subsonic

Hi. I have an Invoice table (and a SubSonic 'Invoice' ActiveRecord) with an InvoiceNumebr column that needs to have unique numbers. I am trying to GetTheNextAvailableNumber() inside of a TransactionScope using block. This works. What I'm not sure of is, what happens if 5, or 50 different users try to create an Invoice at approx. the same...

SubSonic2.2 SharedDbConnectionScope and TransactionScope Transaction Confusion

ARGH!!! There seems to be a little confusion surrounding the SharedDbConnectionScope and TransactionScope objects to enable wrapping your SubSonic queries within a transaction. The docs suggest specifying the using SharedDbConnectionScope wrapped around the using TransactionScope... using(SharedDbConnectionScope scope = new SharedDbC...

Subsonic 3 Hierarchic Collection Creation?

I have a single table with a hierarchy inside. I am using ActiveRecord. How can I convert this into a hierarchic collection that I can then bind to a WinForms or WPF treeview? Thanks. ID Name ParentID 1 ALL 1 2 ARGENTINA 1 15 AUSTRALIA 1 16 NW 15 17 BLACKTOWN 16 18 CORLETTE 16 19 PRIMBEE 16 20 TWEED HEADS 16 21 QL 15 22 AS...

Subsonic: Simple Repository - Update Crash

Whenever I attempt to use a simple repository to simply update a record, I get an object reference not set to an instance of an object error. I suspect that I am doing something incorrect, can anyone see a problem with the below lines of code for saving data to subsonic? I'm using .Net 3.5, SQL Server 2008 and Subsonic 3.0. Thanks for...

subsonic . navigate among records ,view,query

hello everybody i'm some newbie in this matter of .net i'm trying understand this new paradigm i began with linq for SQl but i found this library, kind of framework of T4 more specifically: subsonic T4 i think it could be very usefull but the support docs outside are very scarce my first intention is use them in the very simple form...

How to delete all records in a table using SubSonic 3

I am a little stuck at the moment trying to delete all the records from a table using this approach: new Delete<Contact>().Execute(); This statement fails with a NullReferenceException in BuildDeleteStatement method at line: sb.Append(query.FromTables[0].QualifiedName); because, although FromTables has one entry, it is set to null....

Subsonic Aggregation Constraint ("Having")

Hi, I want to no if there any way to add an "Having" constrain to an aggregation select? Example: if i need all sales sum by date having the sales sum > 1000. Best Regards, TheGodfather ...

SQLite Int64 vs Int32 Problem and SubSonic ActiveRecord

I thought this was covered elsewhere but I don't see it now. Anyway, having a problem with a simple v3 query. Using SQLite ADO.NET provider 1.0.65.0. My table structure looks like this: CREATE TABLE "SamplerData" ("RowId" INT PRIMARY KEY NOT NULL ,"SampName" VARCHAR(128),"SampPurpose" VARCHAR(2048),"ActiveState" INTEGER NOT NULL DEFAU...

Inner Join with more than a field

Precise to do a select with inner join that has relationship in more than a field among the tables Exemple: DataSet dt = new Select().From(SubConta.Schema) .InnerJoin(PlanoContabilSubConta.EmpSubContaColumn, SubConta.CodEmpColumn) .InnerJoin(PlanoContabilSubConta.FilSubContaColumn, SubConta.CodFilColumn) .In...

SubSonic 3 Step By Step WinForm App VB.Net Genrating And Setup

Hi, If some body can write SubSonic 3 Step By Step WinForm App VB.Net: Installation,Setup And Genrating. Thanks In advance ...

Subsonic 3 and Linq Group by with Count

I have the following two tables: Customer { int Id int Name } Bills { int Id int CustomerId decimal Amount bool IsDue } Now I am trying to get a list where I have: A entry for every customer with the count of associated bills. A entry for every customer with the count of associated bills where IsDue is true. I tried doing the fir...

Subsonic 3.0 testing - what am I missing here?

EDIT: This issue is already submitted on Github. Changing the "Act" part to this will make the test pass var result = Adresse.All() .Where(x => x.AdresseX == txt1 && x.PostBy == txt2) .FirstOrDefault(); [TestMethod] public void WTF() { //Arrange string txt1 = "Vings...

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 subsonic.dll and subsonic.core.dll but that didn't work with ambiguous references, etc. So...