subsonic3

SubSonic3 - Url.CreateSortLink

I'm using SubSonic 3.0.0.2 and can't find the Url.CreateSortLink method. Where is it? It was in 3.0.0.0. Has it been dropped? ...

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 3.0 setup problems

I am trying to re-create the setup project as shown in the video of http://subsonicproject.com/docs/Setting_up_SubSonic_3.0 i am using visual c# 2008 express edition and following all the steps but something is wrong. the settings.ttinclude is as follows: const string Namespace = "WSC"; const string ConnectionStringName = "WSC"; //Th...

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 3 and Linq Parameterized Queries

We are currently using SubSonic 3.0.0.2 and playing about with the Linq for it, we've noticed that the underlying SQL is not parameterized. I'm aware that the query tool is and we can work with that but I'm just curious if having parameterized with Linq is possible? Am I missing something? or is this not yet implemented in SubSonic. ...

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

Subsonic 3 Simple Repository And Transactions

Hey everyone, So this is what I have so far. Am I doing something wrong or is there a bug in 3.0.0.3? var Repository = new SimpleRepository("DBConnectionName"); using (TransactionScope ts = new TransactionScope()) { using (SharedDbConnectionScope scs = new SharedDbConnectionScope("connstring", "providerName")) ...

The IRepository interface

I am reading the source code of subsonic 3. in the file IRepository.cs I found the following: public interface IRepository<T> { IQueryable<T> GetAll(); PagedList<T> GetPaged<TKey>(Func<T, TKey> orderBy, int pageIndex, int pageSize); ...many other lines bool Load<T>(T item, Expression<Func<T, bool>> expression) where T ...

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

SubSonic 3 and inlinequery

Where is InlineQuery on SubSonic 3.0 or is there a new equivalient? thanks ...

N Tiers with SubSonic 3, Dirty Columns collection is alwayes empty on update

Hello guys here is what i am doing, and not working for me. I have a DAL generated with SubSonic 3 ActiveRecord template, i have a service layer (business layer if you well) that have mixture of facade and some validation. say i have a method on the Service layer like public void UpdateClient(Client client); in my GUI i create a Clien...

MySQL T4 Templates Error: Metadata file 'MySql.Data' could not be found

D:\Web\CityV2\App_Code\ActiveRecord.tt(0,0) : error CS0006: Compiling transformation: Metadata file 'MySql.Data' could not be found Let me start by saying I'm using VWD 2008 Express. These are the steps I've taken so far: Created an entirely new project Added references for Subsonic.Core.dll and MySql.Data.dll Copied Active Record te...

Subsonic 3.0 General Questions

Ok, I was eagerly awaiting the release of subsonic 3.0 to use as my low-level data layer, and now its out. I'm currently using the ActiveRecord templates (having tried both the repository and advanced templates) and I have one HUGE request and a few questions: Request: Other than bug fixes, Rob please spend the time to provide docume...

SubSonic 3 Regenerate ActiveRecord Class Automatically?

I have a SQLite database and SubSonic3, finally got a clue on how to generate the .cs from the .tt in Visual Studio. My stuff builds now. I can kick off MSBuild automatically to build my project, but I would like to add a pre-build event to regen the ActiveRecord.cs cleanly so any database changes end up there for future Unit tests. H...

Subsonic 3 - Does is it support querying using the IEnumerable.Contains?

This fails with an error with the method "Contains" is not supported. List<int> usedID= new List<int> { 1, 2, 3 }; var f = WebPageContent.Find(x => !usedID.Contains(x.PageID)); Seems odd so what's the alternative approach? This doesn't work either: var dd = from i in WebPageContent.All() where !usedID.Contains(i.PageID) ...

RIA DomainService + ActiveRecord

Hi I tried to use SubSunsonic.ActiveRecord in SL3 project that uses .NET RIA Services. However when I try to return some IQuerable in DomainService class I get an error that the classes generated by Subsonic have a property 'Columns' with an unsupported type. That's what I have public IEnumerable<SE_NorthWind.SuperEmployee> GetInteger...

Where is the SubSonic 3 Test Database "SubSonic"?

I may be a little dense at times but where do I get the SubSonic database referenced by the SubSonic 3 test project? ...