subsonic

Delete using 2 tables join and wheres using subsonic 3

I have 2 tables POST (idpost, user, text) COMMENT (idcomment, idpost, text) i want do delete all comment with post have a user like "usertest" delete from COMMENT c join POST p on c.idpost = p.idpost where p.user like 'usertest' who i make this in subsonic 3??? i try something like this, but, offcourse, don't work hehehehehe COM...

What's the right way to Load child collections inside a POCO with a SubSonic Repository?

I've read the questions asking about the right way to inject data access into POCOs, and the consensus seems to be "don't". Fine, what is the right way then? If I have an Order object, and I want a list of the OrderLines, I don't want to explicitly assign that list to the POCO externally, that's horribly ugly. So if I can't use DI to giv...

WCF, SubSonic SimpleRepository and multithreading

I'm currently in the process of writing a WCF REST service with SubSonic SimpleRepository and the WCF REST Contrib library. The service is going to be hosted on IIS 7. The database is going to be MS SQL Server. I could not really find a good example which is using this combination of technologies on the internet. The service should expos...

SubSonic Conventions

I would love to have a list of SubSonic conventions. I saw http://bit.ly/3punQZ but it didn't seem complete as of today and it seems wrong. It says "table names should be singular". My understanding is that the convention is plural names for table names. I am also not clear on how to name lookup tables. ...

Subsonic 2.2 InnerJoin Across Two Databases

Can anyone provide an example of how to join across two schemas using subsonic 2.2. This doesn't work: SqlQuery qu = new Select("*") .From(NorthwindLeads.Lead.Schema) .InnerJoin(Northwind.StatsMap.SourceIdColumn, NorthwindLeads.Lead.SourceIdColumn); ...

Object mapping with LINQ and SubSonic

I'm building a small project with SubSonic 3.0.0.3 ActiveRecord and I'm running into an issue I can't seem to get past. Here is the LINQ query: var result = from r in Release.All() let i = Install.All().Count(x => x.ReleaseId == r.Id) where r.ProductId == productId select new ReleaseInfo ...

SubSonic and Tree table structure

I have to store a tree-like structure (think folders, for instance) in my database. The model I chose is pretty simple: the table has a FolderId (PK, int, identity), some random attributes and a nullable ParentId (same-table-FK to FolderId, int, nullable). It all works great and all. I'm using SubSonic's ActiveRecord template. Is there ...

Subsonic 3 templates in VS 2010 Beta 2

Hi, I am trying to setup Subsonic ActiveRecord in a web application in Visual Studio 2010 beta 2. In any scenario I get the same error: Warning 1 The path 'D:\Work\Project\tt\SQLServer.ttinclude' must be either local to this computer or part of your trusted zone. Everything works just fine on the same machine with VS 2008. Does anyone...

Subsonic - can anyone provide an example of using Subsonic SimpleRepository to persist a list/array of objects?

I'm looking for possible ways to persist the following classes. Subsonic SimpleRepository looks like it might work, and people have said it should, when I asked a more general question. But I've been unable to find a single example of how to do this - or at least one I could understand. Can anyone point me to an example, or tell me ...

How do I bulk Insert using SubSonic?

I have something that looks like this foreach (var user in NewUsers) { var dbUser = new User {FirstName = user.FirstName}; dbUser.Save(); } That is too many inserts into the database. Can I do something like? User.BulkInsert(NewUsers); Thanks. ...

How to use a string literal to specify a column name in SubSonic 3.0

Here is a statement in SubSonic which does a find using the strongly typed column ProductId: var products = Product.Find(x => x.ProductID <= 10); Is there a way to not use a strongly typed column name and instead specify the column name with a string literal like so: var columnName = "SampleColumn"; var products = Product.Find(x => x...

Subsonic 2.2 & Sqlite

Hi, I've tried to use Subsonic 2.2 & System.Data.Sqlite.Dll latest version (1.65.0), in my project. and recevied an error message, which gave me the idea subsonic got a problem with the sqilte provider. I've switched to it's previous version, 1.60.0 and it seems like the problem was solved. any info regarding this issue? does subsoni...

IRepositories Join in Subsonic

Hi i'm stuck with this doubt: How do I make i Join with 2 IRepositories? look my controller... public ActionResult Colaboradores(int baseid) { IRepository<Colaborador> _repocolab = new SubSonicRepository<Colaborador>(); IRepository<Usuario> _repouser = new SubSonicRepository<Usuario>(); return View(); ...

How do I apply SubSonic 3 "SimpleRepository" changes to production systems

Hey all, I've been playing with SubSonic's SimpleRepository, and it's awesome. However, I would like to know if there's an easy way to apply pending changes to a production system. Previously, I used SubSonic 2's "Migrations" via a batch file; when I was ready to move to production, I'd just run all the pending migrations against the p...

Simple Query using subsonic 2.2 with Oracle.dataclient error.

I am using subsonic 2.2 with Oracle provider. I can use active record but my simple query does not work! int record = new Select(VenApplication.ApplicationidColumn).From(VenApplication)().GetRecordCount(); The error that i got is ORA-00923: FROM keyword not found where expected Description: An unhandled exception occurred during the ...

SubSonic: Case sensitive test?

Hey guys! I'm curious if there's a way to do a case sensitive string comparison in SubSonic? I have the following statement: return new Select() .From<Account>() .Where("email").IsEqualTo(email) .And("password").IsEqualTo(password) .ExecuteSingle<Account>();...

Avoid App.config file in project when using with SQLite/SubSonic (or any other database)

I have a project which I am developing with SQLite and SubSonic 3. I want to know that how can I avoid the App.config file altogether. How do I tell my program to use SQLite Data provider. I mean, how can I tell it this: <DbProviderFactories> <add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework...

RIA base DomainService implementation for Subsonic 3?

So i'm fairly new to both SubSonic and RIA Services. I've done the RIA walkthrough for the HR app and it all looks good, but I'm not quite about creating a DomainService base class for Subsonic. The samples here describe creating a custom base class for your DAL but I wondering if there was already anything out in the wild that did thi...

Does SubSonic run under Mono?

Has anyone deployed SubSonic on Mono? ...

Full text search in Subsonic

Hi everyone, In subsonic v2 I can use inline query for full text search in sql server 2008, like this: DB.Query().ExecuteTypedList<Product>("select * from Product where contains(*, @order)", queryString); all this works fine. But now I would like to move on subsonic v3, so I'm trying to get results through SqlQuery, but ExecuteTyped...