subsonic

Linq expression subsonic 3.0.0.3

Hello, I want to 'build' a combined query for Subsonic 3.0.0.3, what is the best way for this? I tried; Expression<Func<Person, bool>> exp = p => true; Expression<Func<Person, bool>> fContinent = p => p.ContinentID == 1; Expression<Func<Person, bool>> fType = p => p.TypeID == 1; exp = Expression.Lambda<...

Subsonic 2.2 does anyone know how I can reproduce this SQL as a SubSonic Query?

Does anyone know how I can reproduce this SQL Query as a SubSonic Query? SELECT PollID, AddedDate, AddedBy, QuestionText, IsCurrent, IsArchived, ArchivedDate, (SELECT SUM(Votes) FROM sqsc_PollOptions WHERE PollID = P.PollID) AS Votes FROM sqsc_Polls P WHERE IsArchived = @IsArchived1 OR IsArchived = @IsArchived2 ORDER BY Adde...

Subsonic Security Exception in IIS

I changed the trust level for my application to "Full" but I'm still getting the following error in Windows 7. I followed the steps for using subsonic, but it appears I'm missing something. Security Exception Description: The application attempted to perform an operation not allowed by the security policy. To grant this application t...

SubSonic - Class Library Project?

In the SubSonic docs it lists: o By default, the Tool generates insert and update code that uses System.Web.HttpContext.Current.User.Identity.Name and System.Threading.Thread.CurrentPrincipal.Identity.Name. Some generated methods may also make use of System.Web classes. If you don’t want to have to add a reference to System.Web in yo...

Download source for Subsonic 2.2

Is there a place where I can get the source code for Subsonic 2.2? The closest I can find is subsonic 2.1.1. I have the Subsonic 2.2 .dll, but need the source code, for policy purposes....Thanks. ...

SubSonic - dividing up web.config

I'm trying to divide up my web.config into multiple config files so that when I import the DLL to other projects, the .config files will also be imported. Issue is with SubSonicService: I've defined: configSections *section name="SubSonicService" type="SubSonic.SubSonicSection, SubSonic" requirePermission="false"/* /**configs...

SubSonic 2.1: Need explanation of SqlQuery.ExecuteJoinedDataSet()

Hi there, I have a SqlQuery that looks like this: SqlQuery query = DB.Select( Order.Schema.TableName + ".*", OrderDetail.Schema.TableName + ".*") .From<Order>() .InnerJoin<OrderDetail>() .Where(Order.IdColumn).IsEqualTo(1); Now I wo...

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...

SQL Statement to Subsonic Query

How do I write this SQL statement with Subsonic 2.2 Query Object? SELECT * FROM Product WHERE DateDiff(d, StartDate, GetDate()) >= 0 AND DateDiff(d, EndDate, GetDate()) <= 0 ...

Custom attributes on fields in SubSonic

SubSonic newbe question; I want to put custom attributes on properties in the generated classes, is that possible? ...

Edit model object doesn't bind to view as expected

I'm using ASP.NET MVC (1.0), Spark View Engine (1.0) and SubSonic (3.0.0.3). I'm having some trouble getting an "Edit" view to work correctly. So, in my controller, I have the following controller action that displays the edit form view: [AcceptVerbs(HttpVerbs.Get)] public virtual ActionResult Edit(string name) { var plot = Plot.Si...

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 3.0 Medium Trust Issue

Hi guys, I'm having an issue with running Subsonic in medium trust and don't know if i'm querying wrong - if there is some part of subsonic 3.0.3 that doesn't like medium trust can someone tell me? Someone else posted somethin similar a while ago and there was no real reply on whether it did exist or not (the bug). Rob said it had been ...

Does SimpleRepository support any in-memory or other "alternative" database engines?

I am looking for options other than MS SQL Server/Express. There seem to be quite a few file based or in-memory database engines supporting some subset or dialect of SQL. Preferably it would be an engine not requiring installation at all. Is any of them supported by SimpleRepository? Is any of them supported by ActiveRecord? Is there at...

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...

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...

Is it necessary to cache the data for a lazy loaded property with Subsonic 3 simple repository?

I have added a lazyloaded property called Orders on my Customer class. Do you think it's wise to cache the data in a private field? private IList<Order> _orders; [SubSonicIgnore] public IList<Order> Orders { get { if (_orders == null) { var repository = new SimpleRepository("MyConnectionString", Simp...

What's the appropriate type for a lazyloaded property?

If I have a Customer class and want to add a Orders property which would return all orders for this customer, what would be the appropriate type for the Orders property? Some of the possible choices I can think of: List IList IEnumerable ...