subsonic3

Subsonic 3 ActiveRecords Update Dirty Columns are always empty

Any idea why this is happening? The issue was posted here: http://stackoverflow.com/questions/1138102/n-tiers-with-subsonic-3-dirty-columns-collection-is-alwayes-empty-on-update/1139976#1139976 ...

Subsonic 3 - BuildSqlStatement equivalent

Hi, Is there any method in Subsonic 3, that will allow me to view the generated SQL for any query? If not, any hints where in the source I should start to look? I can see each sql class (update, insert, batch etc) has a BuildSqlStatement() method, but I'm unsure where to place my console.writeline to catch them all. (short of placing ...

A circular reference was detected while serializing an object of type 'SubSonic.Schema .DatabaseColumn'.

I am trying to do a simple JSON return but I am having issues I have the following below. public JsonResult GetEventData() { var data = Event.Find(x => x.ID != 0); return Json(data); } I get a HTTP 500 with the exception as shown in the title of this question. I also tried var data = Event.All(...

Subsonic 3 VS Entity Framework

Anyone worked with Subsonic3 and Entity Framework here who can tell me the pros and cons? This is my first time attempting to try these. Subsonic is easy to setup so as the Entity Framework. I am not sure if Entity Framework works with other databases as SubSonic does like MySql PGsql etc...? I read this post (http://www.timacheson.com/...

What LINQ features are not supported with SubSonic 3?

Hi, What linq features are currently not supported in SS3? Can't seem to find a list. Ta, Bob ...

SubSonic 3 Install Question?

I'm eagerly about to install SubSonic 3 and start using it with one of my sites, but I'm already confused right at the beginning!? The install instruction states *Grab the folder containing the T4 templates (the "tt" extensions) and locate the one that named "Settings". Open it up in Notepad and set the value for "ConnectionStringName"...

Subsonic 3, how to CRUD using LinqTemplates?

I am new to Subsonic, and it seems that I cant find out a natural way to do CRUD operations using the LINQ template classes. I guess in ActiveRecord, you could: Product p = new Product(); p.ProductCode = "xxx"; p.Add(); Using the LINQTemplate generated classes however, how can I do the same thing? I can only use something like this ...

Object of type 'System.UInt16' cannot be converted to type 'System.Int16'.

Why I'm having this error "Object of type 'System.UInt16' cannot be converted to type 'System.Int16" when I'm trying to run below code public ActionResult List() { var x = account.All(); return View(x); } The errors showed up, when it's try to iterate my model in my List.aspx file (below code). <% foreach (var item in ...

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 don't want to change my table name I write a t4 template to solve this problem, i hope so...

Failed to resolve include text for file:SQLServer.ttinclude

I updated to the version 3.0.0.3. Dragged the new ActiveRecord directory in VS08, and added the newer dll. I'm not sure whats going on yet. When I try to compile the project I get that error. My SVN server just lost my old version, so I'll have to download the older Subsonic version and see if that fixes the problem. I have no clue ...

SubSonic 3 Installation Doesn't Work?

Ok I have following the tutorial here as best I can http://subsonicproject.com/docs/Setting_up_SubSonic_3.0 As the files you get in the download are nothing like what is shown in the video?? So I am literally just guessing which files to use?? Then I drag the files / folders into Visual studio (As the video shows) and NOTHING happen...

Subsonic 3.0.0.3 Crash

Running the latest version of SubSonic (3.0.0.3). Retreiving a single record, making one field change and calling .Save results in a null reference exception in the code below: public void Update(IDataProvider provider){ if(this._dirtyColumns.Count>0) _repo.Update(this,provider); OnSaved(); } My code to...

subsonic 3.0 , The SqlServer default value doesn't work?

I used subsonic 3 with T4,It's very simple to use.But I get a problem now.I specify the default value in the sqlserver 2005.Then I called save() method in subsonic.I found the default value doesn't work. ...

Paged has a error when database is SqlServer 2000

var products = Product.GetPaged(1, 20); error: 'ROW_NUMBER' .... ...

Can you disable pluralization in Subsonic SimpleRepository?

I usually write my domain object names in its native language, and pluralization of those name will look very ugly, can you turn if of some how? ...

Subsonic 3 - SimpleRepository

Hi guys, I am playing around with Subsonic 3's simple repository and am hitting walls in understanding how to deal with foreign keys... If I have a product object containing int ID; string name; string description; Category category; int categoryID (this one is just to persist the product's categoryID to the DB) and a categor...

Subsonic 3 and Activerecord isn't generating MySQL Stored Procedures

It seems that the included T4 templates (or the one in the SVN trunk for that matter) just skips generating SPs for MySQL... When running StoredProcedures.ttinclude together with MySQL.ttinclude, I get the error "Compiling transformation: The name 'GetSPs' does not exist in the current context". GetSPs is defined for SQLServer and I saw...

SubSonic 3.0.0.3 Update Exception

When I attempt to update in SubSonic I'm greeted with a Null Reference Exception. This is the exception message I get: Object reference not set to an instance of an object.","StackTrace":" at SubSonic.Query.Update.GetCommand() I've checked the object I'm updating and there are no missing fields, all the class properties match t...

Subsonic 3 - Update NullReferenceException

I am using Subsonic v3.0.0.3 with the Linq templates. I am attempting to update a record in a SQL Server Express database with the following: var db = new MyDB(Constants.Database); db.Update<Contact>() .Set(d => d.FirstName == contact.FirstName) .Where(d => d.Id == contact.Id) .Execute(); I am receiving a NullReferenceException ...

SubSonic 3 and multiple PK columns

I'm having problem with SubSonic 3 and multiple Primary Key columns. It seems like it isn't supported via the ActiveRecord T4 script. In line 173 of Settings.ttinclude return this.Columns.SingleOrDefault(x=>x.IsPK) ?? this.Columns[0]; It tries to get a Single Primary Key Column and failed. Any solutions? ...