Hi!
I have a column named 'Key' in a MySQL database. Seems that the
repo.Find<Class>(x=>x.Key.StartsWith("BLAH"));
generates the SQL code
WHERE Key LIKE 'BLAH%'
instead of the correct one like
WHERE `Key` LIKE 'BLAH%'
How can I force the later behaviour (is it a bug in SubSonic?)
Cheers,
Tomasz
...
Has anyone used Subcommander to generate views or edit aspx pages in webforms projects.
If so any tips/help advice or alternatives would be really helpful.
...
enter code hereHow do I get the distinct count the ProdID column in this aggregate query?
Dim query As SubSonic.SqlQuery = New SubSonic.Select(SubSonic.Aggregate.GroupBy(TOrders.DelivDateColumn, "DelivDate"),SubSonic.Aggregate.Count(TOrders.ProdIdColumn, "ProdId")).From(of TOrders)
If I add Distinct() at the end, its working on the re...
(SubSonic) I have this initial declaration to do a simple join.
var ji = from pli in PriceListItem.All( )
join ci in CatalogItem.All( ) on pli.CatalogItemID equals ci.CatalogItemID
select new { pli = pli, ci = ci };
Before executing the sql, under some circumstance, I want to add a join to an in-memory list. When I...
Hello!
I am trying to convert a stored proc over to subsonic and the store proc contains something like this:
SELECT * FROM Person
WHERE (Firstname + ' ' + Surname) LIKE '%name%'
How do I do this in subsonic?
Thanks for any help!
Bex
...
Using SubSonic3, I have this generic method (thanks to linq guy, James Curran):
public List<T> GetFromList<T>( List<Guid> _IDs,
Func<T, Guid> GetID,
Func<IQueryable<T>> GetAll )
where T : class, IActiveRecord
{
List<T> rc = null;
var Results =
from item in GetAll( )
...
Hi all,
I'm using subsonic 2.2 in one of my projects. I'm have a comment section where i query one table called Comments. First I query all records with ParentId=0, and then in the foreach statement I query all records with ParentId=currentRecord.Id. Now I know this is a bad habit but I don't know how to get around this in a single quer...
Using Subsonic 3, I have a simple class called "ConferenceRepository" that has a method that returns a bunch of conferences based on their status. I am testing this using SubSonic's built in support for testing. My setup of the repo looks like this:
// 2 Approved, 4 pending, 3 rejected
var data = new List<Conference>
{
...
(Disclaimer: I changed/obfuscated some of the variable/table/column names here for security reasons. Please forgive me if something looks a little off.)
I am building a front-end to an Oracle 10g database, and I'm trying to get paged data. Aside from paging, the following SubSonic 2.2 code gives me what I want, in the order I want it:...
Is it possible to apply a WHERE clause on a SubSonic query?
For example, I get get a single based on id...
db.Single<Storage>(id);
But how can I get a single based on a simple WHERE clause?
db.Single<Storage>(WHERE columnname == "value");
...
I'm quite comfortable with VB and have a very large project i need to do. I've come across SubSonic and it looks awesome.
I am not clear if i can use it in VB. I've seen a a couple of posts that suggest they did but on the site it specifically shows C#.
Can I use SubSonic with VB.NET?
...
Using VS 2008 and SubSonic and MySQL 4.1 and MySQL Connector 6.2.4... running the custom tool on any of the .tt files receives this exception. Now my guess is this is an issue outside of SubSonic.
Error 2 Running transformation: System.NullReferenceException: Object reference not set to an instance of an object.
at MySql.Data.MySqlC...
Hi Guys
Im trying to generate my dal and this works but when i check my code in visual studio 2008 i get this message "the type or namespace name does not exist in KimDal"
Im using sql expreess 2005, full version of vs2008, and i setup a new c# 2.0 website.
I installed the 2.1 installer for subsonic, add added it to my external tools,...
Hi Guys
Im new to subsonic and generally this was of programming, i usually develop from a rad perspective so using the visual studio dataset designer, but i wanted to start looking at developing n teir approach.
Ive never used a business logic layer, (naughy) normally my code behind takes care of validation so to speak aswell as gener...
Hi Guys
Im using subsonic 2.2
I tried asking this question another way but didnt get the answer i was looking for.
Basically i ususally include validation at page level or in my code behind for my user controls or aspx pages. However i haev seen some small bits of info advising this can be done within partial classes generated from s...
Hi guys!
Is there somethink like a documentation for subsonic 3? I'm just beginning to use it and have a lot of questions.
First up this error message:
"Can't decide which property to consider the Key - you can create one called 'ID' or mark one with SubSonicPrimaryKey attribute"
The code in question is generated by the context.t...
Hi Guys
Ive been using subcommander to generate my dal. Im using vb.net and sqlexpress and .net 3.5
My webconfig looks like this
<!-- add subsonic in for dal-->
<section name="SubSonicService" type="SubSonic.SubSonicSection, SubSonic" allowDefinition="MachineToApplication" requirePermission="false"/>
</configSections>
<connection...
Can anyone advise me on extending the out-of-the-box scaffold within SubSonic 2?
When a user clicks the Save button, which triggers the btnSave_Click void, I would like to execute another stored procedure based on the record they have just updated.
What's the best approach? Many thanks.
...
Here's a strange one. I'm using SubSonic 2.0.3 to insert a new row into a given table.
The table includes an int identity field that is set up properly in the database (Identity seed = 1, Identity increment = 1). Obviously I do not explicitly set this value before calling .Save().
Ever since I rebuilt my development DB (copying fro...
I am trying to join two objects, the first is a (static) local object defined in a Helper and the second (Subsonic) Database object.
Here is the offending extract from my repository, I wont bore you with the models and helpers unless requested.
public IQueryable GetData(string DataType)
{
IQueryable<DatabaseObject> dat...