Все вопросы: [subsonic]

592 вопросов

1
голосов
1ответов
127 просмотров

SubSonic Conventions

I would love to have a list of SubSonic conventions. I saw http://www.subsonicproject.com/docs/Conventions 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 n...

3
голосов
1ответов
207 просмотров

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

1
голосов
2ответов
420 просмотров

Delete using 2 tables join and wheres

I have 2 tables, POST (idpost, user, text) COMMENT (idcomment, idpost, text) I want to delete all comments with post that have a user like "usertest", delete from COMMENT c join POST p on c.idpost = p.idpost where p.user like 'usertest' How do I do this in subsonic 3? I tried something lik...

0
голосов
2ответов
205 просмотров

SubSonic 2.2 Class Generation

I am using SubSonic on a project with many tables which were created by a sourcecode generator. I noticed Some classes created by SubSonic were generated without code and have the folowing message The class...was not generated because ... does not have a primary key. Is there any way for me to...

0
голосов
1ответов
76 просмотров

SimpleRepository and booleans with SubSonic

I am trying to add a boolean column in SubSonic 3.0.0.3 and without this column the code works fine but as soon as I had a bool variable into my model this fails with the following error: The name "False" is not permitted in this context. Valid expressions are constants, constant expressions, an...

0
голосов
1ответов
498 просмотров

How do I refresh the SubSonic T4 Template generated code?

I've just started using SubSonic 3 and I'm using the ActiveRecord T4 template. If I make a change in the database (add a column to a table for example), what is the correct method for forcing the code produced by the T4 templates to be re-generated? At the moment I'm just deleting the ActiveRec...

1
голосов
1ответов
433 просмотров

subsonic timestamp issue on insert record

My problem is about the timestamp column in one of my database tables. This field is required because sqlserver automatically generates it. Since this column is required subsonic included it in the insert query.. im using subsonic 3.0 info.Save(); error message: Cannot insert an explicit v...

1
голосов
1ответов
517 просмотров

Update a column value based on another column value with SubSonic 2.1/2.2

I have the following code using SubSonic 2.1/2.2 SubSonic.Update(<some table>) .Set(<column A>) .EqualTo(<column B>). Where(condition...).Execute() I would like to change it to update "column A" with the value of "column B" + 1. How can I do it with this syntax. Is there a b...

2
голосов
2ответов
190 просмотров

Can SubSonic's SimpleRepository enlist in a transaction for two different object types?

I've been exploring Sub Sonic 3's SimpleRepository and have been pretty happy with it but have a question regarding transactions. I am aware that using methods like 'AddMany' and 'DeleteMany' will automatically perform all of those operations within a single transaction, but was wondering if it's...

1
голосов
2ответов
416 просмотров

SubSonic Outer Join

There seems to be a Bug with the Outer Join statement in SubSonic 3, or maybe it's just my ignorance, but the following craps out: var Objeto = from t in Table1.All() join su in table2.All() on t.Id equals su.Id join tab2 in Table1.All() on t.PId equals tab2.Id into gj ...

0
голосов
2ответов
425 просмотров

Left join in SubSonic Problem

I'm a beginner in SubSonic and I'm using version 2.1. I'd like to perform a left join in this query. The query looks like: select ... from tableA left join tableB on tableA.Cola=tableB.Colb and tableB.Colc='some value' I want to know how to perform the and tableB.Colc='some value' condition. ...

1
голосов
2ответов
673 просмотров

Where to find SubSonic 2.2 Source Code?

I'm a bit confused on where to find the most up-to-date copy of SubSonic 2.x, after following the links I think it's here: http://github.com/subsonic/SubSonic-2.0 on GitHub, but I don't see anything showing it's 2.2+ versus something lower like 2.0 or 2.1. Can somebody confirm that GitHub has th...

1
голосов
4ответов
122 просмотров

SubSonic 3 MaxLength for Column

I have a clumsy way to get the max length of a column in the database, but it's so bad that it seems wrong: var length = new DataNS.WidgetTable(provider).description.MaxLength Do I really have to instantiate some object and go digging through it? I even have to pass a provider to it explicitly...

0
голосов
2ответов
290 просмотров

How to automate Subsonic 3 audit fields so they work like Subsonic 2

I am using SubSonic 3.0.0.3 in SimpleRepository mode. I was wondering how to get Subsonic 3 to automatically create and populate the createdon, createdby etc audit fields that were standard in version 2.x . Is this something I have to configure with the T4 templates?

3
голосов
1ответов
186 просмотров

Spatial data types in MS SQL 2008 and Subsonic 3 - workaround available?

Using the latest version of Subsonic (3.0.3) it doesnt appear to me that the geometry or geography data types are implemented as of October 09. My questions are: if and when is this support likely to be added? does anyone have a workaround to support operations on simple geography types at th...

1
голосов
2ответов
872 просмотров

where is subsonic 2.* documentation

I have to get up to speed with subsonic 2.* to support an existing application. The subsonicproject website has a few walk-throughs but I was hoping to find something more complete. For instance, I don't see any mention of how to create a new record using subsonic. Thank you, Myron

0
голосов
1ответов
107 просмотров

Linq query help

I'm attempting to write a linq query which uses several tables of related data and have gotten stuck. The expected result: I need to return the three most populous metropolitan areas per region by population descending. tables w/sample data: MetroAreas -- ID, Name 2, Greater New York Cities -...

1
голосов
2ответов
1065 просмотров

Subsonic: How to exclude a table column so that its not included in the generated SQL query

I need to insert a record to a table. Subsonic builds the query something like this (as far as i know): INSERT INTO Table1 (Title, Description, RowVersion) VALUES (@Title, @Description, @RowVersion) But i want to remove the RowVersion column from the SQL query bacause its autogenerated by th...

0
голосов
1ответов
53 просмотров

Subsonic Question, is it possible execute templates during runtime?

Before ask my question, i have to say that subsonic is wonderfull tool, i realy like it. I have an application which is createg domain layer during the runtime itself. I mean It has got customizable entites and when the entity added or any entity schema changed my model layer compiled again in th...

0
голосов
1ответов
283 просмотров

Subsonic 3 with Oracle support

Is there an oracle ttinclude file available anywhere?

0
голосов
1ответов
174 просмотров

Subsonic 3.0.0.3: issues with load slowdowns

I'm using subsonic 3.0.0.3 (active record) quite a simple database really, have trusted in its abilities but i am really getting let down by how incredibly slow it it to do anything. For some reason it likes to run through things more than once. For example: var newitem = new new_quote_item { ...

1
голосов
2ответов
705 просмотров

How do you migrate existing data with Subsonic migration?

I watched the http://www.subsonicproject.com/docs/Using_SimpleRepository screencast, but I am left wondering... how do you migrate existing data? Assume you decided to split a Name property into a FirstName and LastName. How do you do this in Subsonic?

1
голосов
1ответов
164 просмотров

What is the best way to use nested Objects with Subsonic when I only have Iqueryable for Foreign Key Relationships

I'd like to use Subsonic in a shopping cart application, but I'm trying to replace code that is using Session to store an Order object. That Order object has a collection or OrderDetail objects that are added to the collection through the shopping cart process. I'm impressed with what Subsonic ...

0
голосов
1ответов
70 просмотров

How I can add undo functionality with SubSonic

How I can add undo functionality with SubSonic?

0
голосов
1ответов
990 просмотров

Subsonic IN Query with Multiple Strings

I'm trying to do a Subsonic Query with an IN statement containing multiple strings. If I manually hard-code the strings, it works fine. Example: Dim qry As New [Select]("mySelectColumn") qry.From(table.Schema) qry.Where(table.Columns.mycolumn).In("string1", "string2", "string3") Hoever, I ne...

1
голосов
4ответов
633 просмотров

Debug a Subsonic Select Query

I've got a Subsonic query that isn't returning any values. I think the problem is in my where clause, although I'm not sure why. What I'm really looking for is a way to debug the query to see the SQL that's actually being spit out by Subsonic. I know there was a way to do this with the Query o...

0
голосов
3ответов
158 просмотров

Error with Subsonic 2.1

I'm getting very odd errors when compiling our Data Access library (all subsonic). Errors are Error 35 The type name 'Web' does not exist in the type 'S3.DACL.System' C:\Projects\S3\src\DACL\AspnetUser.cs 369 63 DACL And Error 37 The type name 'ComponentModel' does not exist in t...

0
голосов
1ответов
132 просмотров

SubSonic 2.2 Scaffolding in MVC 1

Can anyone point me to a doc on how to get Subsonic's 2.2 scaffolding working in MVC 1. Or, does Subsonic's 2.2 scaffolding even work in MVC 1? Love this software btw...Thanks Rob and others.

0
голосов
3ответов
393 просмотров

Subsonic 3 Active Record TestRepository identity column not incremented

I am Unit Testing with Subsonic 3.0.0.3. Unit tests ran as expected with record count assertions passing. However the testing framework does not auto increment identity columns. For example var p1 = new Person() { Name = "Jack" }; p1.Add(); var p2 = new Person() { Name = "Jill" }; p2..Add(); ...

0
голосов
2ответов
91 просмотров

Subsonic adding new fields to existing site

i've inherited a project that is using subsonic. I wish to extend the OrderItem class with a new property "ProductType". I am able to add the following. But as this a sub directory of /generated/ i'm obviously feeling like i'm missing a trick here. Do i need some kind of BAT file. [XmlAttrib...