subsonic3

How do I pass contructor arguments with dependency injection using Castle.Windsor?

I am wiring up my first SubSonic 3 application (in an ASP.NET MVC 1.0 front-end) and am looking at Rob's SimpleRepository. I'm using Castle.Windsor as an injection framework. In my application startup, I configure Castle to bind a SubSonic SimpleRepository to a SubSonic IRepository. Nothing complicated there. However, the SimpleRepo...

Lifetime management of a SimpleRepository

I'm just starting with SubSonic 3 and playing with the SimpleRepository approach. What's the intended lifetime of SimpleRepository classes when used in a desktop application? Are you expected to keep creating a new instance for everytime you want to touch the database? Should I create an instance to use for each group of database calls ...

Subsonic:SimpleRepository Parent Child relationship

Hi, I am trying to use the SimpleRepository feature in Subsonic3 - first of all, I must say a big thanks to RobC - Subsonic really rocks, and I can't wait to see additional updates to the SimpleRepository. I am a big fan of the migration approach (developer/class driven rather than starting with the DB). I have had a look at the post he...

SubSonic3 Linq query generates "IS NOT NULL" instead of "IS NULL"

here is my linq query: var test = from m in db.Members where m.UserId == null select m.Id; test.ToList(); UserId is a nullable Guid field on the members table that corresponds to the ASP.NET membership table aspnet_member. I am unable to generate a query through subsonic that will select where the userid IS null, only where ...

SubSonic Stored Procedure Issue - Data Generated at Stored Procedure is different from Data Received by Stored Procedure in Output Parameter

Hi All, I am facing a unknown problem while using stored procedure with SubSonic. I have written a stored procedure & application code that takes first name & last name as input parameter and return last login id as ouput parameter. It creates login id as first character of first name & complete last name for no-existing login id otherw...

Subsonic3 Active Record Query using SubSonic.Query.Select throwing errors

So I am trying to get the following query to work using SubSonic3 ActiveRecord with a Sql Server 2008 backend facilities = new Select().From<Facility>() .ExecuteTypedList<Facility>(); as well as the following facilities = new Select().From<Facility>() .InnerJoin<mem_Users_Facility>().InnerJoin<mem_User>()...

Does SubSonic 3.0 SimpleRepository support SQL Server Compact Edition?

Can someone confirm one way or the other if SubSonic 3.0's SimpleRepository supports SQL Server CE (Compact Edition)? I tried it and failed but I'm not sure if I'm doing something wrong or if it's not supposed to work. I'm finding conflicting information online. The SubSonic documentation page says that SQL Server CE is supported in Sub...

Subsonic query with critera on a one-to-many relation

When using SubSonic 3.0 i have encountered a small issue that may be quite easy to solved, but please, enlight me with the solution :) I have a NewsArticle table with some news, each newsarticle can be published on different sites. So there is a Site table and also a NewsArticleSite table. The NewsArticleSite table contains a primary ke...

Error with Subsonic attempting to convert Timespan to String

Hi, using Subsonic v3.0.0.3 with MS SQL 2008 (10.0.2531) and have two columns in a table 'Date' and 'Time' (not DateTime columns) and when the ActiveRecord SingleOrDefault (line 14110) attempts to load the object (via a given pkid) this error is thrown; "Object of type 'System.TimeSpan' cannot be converted to type 'System.String'." An...

Subsonic 3 and GridView

Is there some docs or examples, about best practices working with Subsonic3 and Gridview? Sorting, paging etc... In Subsonic2 there was quicktable, does Subsonic3 have something simnilar? ...

subsonic 3.0.0.3 multiple database connection failover

hi there, am using MVC and Subsonic 3.0.0.3 but i cant seem to pin down a specific point for multiple database connection. normally in normal .net i would have my 2 strings in the web.config file and have a database class for my project, within this db class i would do something like this: try { conn.ConnectionStr...

How do I use SimpleRepository without the migration approach?

I am evaluating SubSonic for use in Phase 2 of a large project. This is an ASP.NET project, with 700 tables in a SQL Server database. We are planning for our domain model to consist of POCO classes to assist with an offline access requirements we have. I believe that the SimpleRepository pattern would be among my best options. Since ...

subsonic 3.0.0.3 multiple database connection failover

Possible Duplicate: subsonic 3.0.0.3 multiple database connection failover re-posted this is never seemed to actually go up onto the listings ????? bizzare hi there, am using MVC and Subsonic 3.0.0.3 but i cant seem to pin down a specific point for multiple database connection. normally in normal .net i would have my 2 stri...

SubSonic GetPaged method - different index needed in unit test

I'm using SubSonic 3, and am using the ActiveRecord approach. I have a simple query in my controller: var posts = from p in Post.GetPaged(page ?? 0, 20) orderby p.Published descending select p; The "page" variable is defined as an nullable int (int?). Here's the problem, when I run the following test, it work...

Linq expression decimal culture

Hello, I have this piece of code: fee.SingleOrDefault(f => 100.05M >= f.Rate); In the database the Fee.Rate is a money field stored using invariant culture. But using this select gives an error because my current culture will convert "100.05" to "100,05" wihich results in; An expression of non-boolean type specified in a context whe...

SubSonic Active Record

I recently decided to give SubSonic a try in my new project. I really how simple it is to generate all the models and database queries. But I have encountered some problems. But I think it generates the models wrong (Or maybee I need to create simpler relations). For an example; In my database shown in part in the picture below it gener...

SubSonic3 - Column 'CategoryID' cannot be null

I'm using Subsonic with SimpleRepository: using System; using System.Collections.Generic; using System.Linq; using System.Text; using SubSonic.DataProviders; using SubSonic.Repository; namespace SubSonicTest { class Program { public class Product { public int ProductID { get; set; } publi...

error while mapping database schema

When I try to map with subsonic 3.0.0.3 database, i get error: "Running transformation: System.InvalidOperationException: Sequence contains more than one matching element..." Where i should look for error? ...

Simple SubSonic 3 Generation issues

I'm trying to do a proof of concept using SubSonic 3 but Sstraight away i'm hitting numerous errors with the generation. I started making alterations to the generator settings but that seems a little odd when I'm just trying to do a simple one to one mapping of my DB. Firstly I found an SP that had @delagate as an SP parameter name, thi...

SubSonic Batch insert

I am familiar with SubSonic 2.2 and am coming up to speed with 3.0 and am unsure of the best way to do something. I have a CSV file that I am parsing and then inserting the records into the database. I want to be able to process the batch of inserts all at once. IE I would like to parse through the records and add them to a List inser...