subsonic

DataProvider = ProviderFactory.GetProvider("") NullReferenceException?

I am getting a NullReferenceException when SubSonic calls the default contructor for my database. In my case the line it errors on is. DataProvider = ProviderFactory.GetProvider("MDMA"); I have the namespaces set correctly and the classes seam to be getting generated correctly, so it looks like I can connect to the database. Is this ...

SubSonic 3 ActiveRecord lambda expression partially ignored on delete

I have tables Users, Widgets and Layouts. Users have many-to-many relationship with Widgets via Layouts. Each Layout has UserID and WidgetID. I want to delete a Layout that matches specific UserID and WidgetID. Using SubSonic 3 ActiveRecord I write: Layout.Delete(x => x.UserID == user.id && x.WidgetID == id); However, SubSonic delete...

DateTime fields updates cause exception

Hi. I've been using subsonic 3.0 for the past few days and ran into a problem. Using ActiveRecord and calling save on the existing record caused: [SqlException (0x80131904): The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.The statement has been terminated.] The code I'm using is j...

SubSonic Update 2.1 to 3.0

Hello, is it a big problem to uopdate form 2.1 to 3.0? Are there any changed features/metods, or only new added features like Linq-Support and so on? Regards, Martin ...

SubSonic 3.0 and Substage

Hi, with the new version 3.0, can i use Substage and the old-fashion config settings or i move to use only T4 templates ? Thanks in advance, Giuseppe. ...

Subsonic 3 .Save() VS .Update() and .Add()

What is the difference between: .Save(); .Add(); .Update(): ...

SubSonic - Non-Crud Stored Procedures

I want to create a Data Access Layer for a small application. The stored procedures have previously being created and are not basic CRUD ones. Most are quite custom and don't really map one-to-one to tables in the database. I also need concurrency support. Can SubSonic / SimpleRepository handle this for me? ...

How to get a complicated PagedList using SS3

In my demo, I have three table in database, TProduct, TCategory and TProductCategoryMap. TProduct (ProductId int PK, OtherFields) TCategory (CategoryId int PK, OtherFields) TMap (ProductId int PK, CategoryId int PK) Now, I need to get a PagedList of Products with specific categoryid. Here is my code: IQueryable<Product> ...

Subsonic postgreSQL Template

I am new to Subsonic and would like to try Subsonic 3 with postgreSQL. Are there any templates available for postgreSQL? The download includes templates for mySQL and SQL Server only. ...

SubSonic and MS SQL Server Compact - Data Provider

I developing new application and I would like using SubSonic and SQL Server Compact. But when I run my simple app (for trying SubSonic) I get exception "Unable to find the requested .Net Framework Data Provider. It may not be installed." Anyone have some advice for me, how solve this? I have reference to System.Data.SqlServerCe UP...

Namespace exception

Hi I'm getting the following exception on a web site hosted by Fasthosts. It's only recently started and is resolved by editing web.config thereby recycling the app. Problem is it comes back every 2 week or so. Any ideas anyone? Exception Details: System.ArgumentException: The given name 'NHSSBS' matches at least two names in the coll...

subsonic - collection load versus query

I am setting the data source of a datagridview to a subsonic collection TcolorCollection tc = new TcolorCollection().Load(); dataGridView1.DataSource = tc; and I've noticed that the previous code is much (way to much) slower then the following SubSonic.Query q3 = new SubSonic.Query("tcolor"); q3.QueryT...

How does Subsonic handle concurrency?

Can somebody shed some light for me on how SubSonic 3.x handle concurrency? I checked out the document online but it's rather sparse at the moment. Any pointers and/or examples would be greatly appreciated. ...

SubSonic ActiveRecord in HttpHandler (Where does the connection string belong?)

I am using SubSonic 3.0.0.3 (the ActiveRecord approach) in an HttpHandler that I have in its own library. For it to work in the end, I have to have the connection string in the website's web.config instead of the class library's app.config. Is this the expected result or a bug? ...

SubSonic 3.0 - Medium Trust

In June 2009 SubSonic 3.0 was released. Because I'm looking for an ORM solution for my website which is able to work in a medium trust environment this looks an option. From searching this site I noted that SubSonic 2.0 is able to work in a medium trust environment. With respect to 3.0 I could not find this on the web. Does anyone has...

Place for common code.

I found some repeated code in SubSonic.Repository package (don't know if this is the right word). For example: The code for method int UpdateMany<T>(IEnumerable<T> items) in SimpleRepository.cs looks awfully similar to code for int Update(IEnumerable<T> items) in SubSonicRepository.cs I would like to move this kind of code into...

Reproduce a "DELETE NOT IN" SQL Statement via LINQ/Subsonic

I want to do something like DELETE FROM TABLE WHERE ID NOT IN (1,2,3) AND PAGEID = 9 I have a List of IDS but that could be changed if needs be. I can't work out how to get a boolean result for the LINQ parser. Here is what Subsonic expects I think. db.Delete(content => content.PageID == ID).Execute(); I can't work out how to do the ...

Subsonic 3.0 Simplerepository : How to execute plain sql (CTE)?

I've been trying out Subsonic, but I've ran into a problem where I would like to be able to execute CTE towards by SimpleRepository and be able to get my POCOs back from that query. Is there any way to execute direct SQL in Subsonic 3.0, when using Simplerepository approach? To explain my problem in Northwind db example: I want to get ...

Subsonic 3.0 Left Join

Trying to do a left join in subsonic using linq but it doesn't seem to work, I get a big error. I'm pretty sure the query is correct as I've done it a few times with objects and Linq2Sql. var post = from p in Post.All() join q in Quote.All() on p.ID equals q.PostID into pq whe...

SimpleRepository Boolean mapping problem

I am using SubSonic (v3.0.0.3) to do simple object mapping with SimpleRepository to SQLite. Everything works fine with Properties of type string, DateTime, Guid and int. When I try to add a bool (or Boolean) Property to the object, I can add it to the database just fine, but when I try to retrieve it, I get the following error message:...