subsonic

Subsonic 2.2 can't work out how to do my joins

Hello! I'm quite new to subsonic and I am trying to do an almight great query with lots of joins.. I can do it in sql but really want to do it in subsonic but cant work out how.. this is the query in SQL SELECT dbo.Job.JobId, dbo.Job.JobReference, dbo.Job.Title, dbo.JobCategory.CategoryId, dbo.JobOc...

I need a SubSonic 2.0.3 - SubCommander exe

I am trying to make changes to a site that uses SubSonic 2.0.3. I have all of the code but I need to regenerate some database tables. I do not have the SubCommander exe though. I looked for an archive location but I can not find it. Is there a way to get the SubCommander of this version. I really don't have the time to change every pag...

Subsonic 3 LINQ Projection issue, fixed or no?

I'm currently experiencing the issue mentioned here (and several other places): http://stackoverflow.com/questions/1105052/subsonic-3-linq-projection-issue This is occurring using the 3.0.0.4 release package, and it also occurs when I grab the latest from GitHub and build it. I am using the LINQ Templates. I have this code: v...

Subsonic Simple Repository - Persist Private Property

I am making use of Subsonic SimpleRepository i have a class: public class X{public string abc {get; set;}private string def {get; set;}} property "def" is only set within that class and i don't want the property to be visible externally, but for some reason when i save the object using Repo.Save(x) the private property is not persist...

Subsonic DB Schema Generation.

I was watching subsonic's simple repository demo. I came to know that DB schema can be generated from code. I think of code generation as usually domain layer from database. Where is this useful? ...

inner join issue in subsonic

Table:Account AccountID|AccountName|AccountTypeID|IsActive 17 |aaaa |5 |1 18 |bbbb |5 |1 19 |cccc |5 |1 Table:AccountAddress AddressID|AccountID|CityId 1734 |17 |2721 1823 |18 |2721 1912 |19 |2722 Table: City CityID|StateProvID|CityName 2...

Invalid Objet Name Exception Thrown on Update

I have a project using Simple Repository which was working before I rebuilt my dev machine. This may just be coincidence but I am now using SQL Server 2008 Express to develop against rather than 2005 and now when I run my project I get the exception "Invalid object name 'TableName'". the table exists as records are inserted fine but when...

SubSonic How to Execute a SQL Statement?

Hello, My site is using Subsonic 2.2 on my site. I have 1 weird situation where I need to run some ad-hoc SQL statements. public IList<string> GetDistincList(string TableName, string FieldName) { string sqlToRun = string.Format("SELECT DISTINCT {0} FROM {1} ORDER BY {0}", FieldName, TableName); Query query = new Query(TableNam...

generated StoredProcedures.vb class is empty

Hi, i've added to my MySQL database, 2 stored procedures, then generated data access classes using the Subsonic Tool in visual studio... i notice that the StoredProcedures.cs class is empty.. why is that? and what do i do now? how will i use my stored procedures i my application? im using subsonic 2.1 and mysql administrator 5.0.. pl...

SubSonic "Save" improvement suggestion

[We are using ActiveRecord.] While running Sql Server Profiler, we noticed that a simple "Save" was preceded by a good bit of database activity. We found that the SubSonic core runs through all the properties and saves their values in a dictionary before it actually does the save. We typically "extend" our data objects in partial class...

SubSonic SimpleRepository Find Method with nullable DateTime

using SubSonic3 SimpleRepository; I have a table used for an email queue which has a SentOn DATETIME column that allows nulls. Using the following Lambda expressions have yielded me errors, does anyone have any ideas how to select a list from the table were the column is null. IList<Email> emails = _repo.Find<Email>(x => x.SentOn == n...

SubSonic Active Record Generate Class

hi everyone, i wanna use to subsonic 3.0.4 but i dont know, how can i start to generate class and use to new Template of T4. example: create new solution for generating to table's class and add to my project. ?? thanks ...

With SubSonic is there a way to express relationships without foreign keys?

Our database does not have foreign keys, but we wish to be able to use SubSonic. Are there any ways except for foreign keys to express relationships between tables? Also see this related question ...

errors when i use subsonic

i downloaded subsonic and am using the instructions in this page http://subsonicproject.com/docs/Using_ActiveRecord. i get the following error when i run the custom tool on ActiveRecord.tt, Context.tt and Structs.tt files. i dont know where to look to troubleshoot. Error 2 A namespace does not directly contain members such as fields o...

Doing joins with SubSonic/ActiveRecord easily?

Hello, I am using SubSonic with the ActiveRecord template. I like it pretty well so far but can not figure out how to do a join query. I have read this link but the generated class templates it creates does not have anything of type IColumn Is there something I am missing here? Also, I am using SubSonic 3.0 ...

SubSonic 3.0 Migrations Vs. SimpleRepository Auto-Migrations: Foreign keys support?

Hi All, I'm considering using SubSonic to create and access an SQLite database. Not sure yet what flavor fits better for me though I tend to prefer the SimpleRepository approach. Indeed I don't expect my DB to do much more than storing my objects and basic querying. I've been through to docs but there are still a few points unclear to ...

cannot use a dll that has subsonic dataaccess

i generated my dataaccess dll using subsonic 3.0. i have a new proj referenced to this dll and am tryign to insert data to my mysql database. i get the following configuration error. however when i look at my App.config, i have a connectionstring that defines my database connection. <?xml version="1.0" encoding="utf-8" ?> <configurati...

Failed to find or load the registered .Net Framework Data Provider exception subsonic

i created a dataaccess dll with subsonic. now i am using it with my app but i keep getting exceptions when i access it. {"Failed to find or load the registered .Net Framework Data Provider."} it keeps hitting this exception when it goes thro this block of code public dbTorontoTraderDB() { if (DefaultDataProvider =...

add connection string without using app.config

i created a data access layer dll using subsonic. however it uses the connectionstring from the app.config. i am using it in ninjatrader and dont want to mess around with the ninjatrader app.config for the connecitonstring. how do i avoid this issue. ...

Subsonic and Two DataText Columns in ASP.net Dropdownlist control

Hi, Does anyone know how I can concatenate two columns in my subsonic datasource? I want to display a first and last name in this dropdownlist but I don't want to put them in the same SQL column. Thanks in advance! ...