How would it work in Subsonic's SimpleReporitory if I wanted to be able to have a 1 to many relationship between objects?
Would I have to create a bridge object and then build my parent object at runtime, or is this support built in?
What I am looking for is the folowing:
Adam's Example Shop...
Public Class Shop
Private m_id As...
I am using
Visual Studio + Subsonic 3 + Multiple Projects + T4 Templates + "transform all templates" and I have two projects each with their own DB and associated activerecord.tt files etc.
Then I right click each tt file in select run custom tool - all is OK
BUT when I click on "transform all templates" all hell breaks lose with we...
Hi!
How do I handle relations in SubSonic 3 using the SimpleRepository? E.g: Having Author and Book (see below) I want the assigned Author to be persisted when the Book is persisted.
[Serializable]
public class Book
{
public int Id { get; set; }
public string Title { get; set; }
public Author Author { get; set; }
}
[Serial...
HI:
I have 2 Structure of the same DataBase,used ActiveRecord
IDataProvider db= SubSonic.DataProviders.ProviderFactory.GetProvide(connectionStringName);
db is not default IDataProvider.
When "T.Save(db);" Throw Exception .
Message: typeof(T).name+"s" of no avail
When I change to default DataProvide. T.save(); That's OK!!
sub...
I've been trying to solve a little problem with VB.NET and the expression trees it likes to generate.
I have a simple test...
Public Sub ActiveRecord_Find_By_NonKey_Returns_123()
Dim orders = Order.Find(Function(item As Order) item.EmployeeID = 1)
Assert.Equal(Of Integer)(123, orders.Count)
End Sub
One would expect that to wor...
I am trying out SubSonic to see if it is viable to use on production projects. I seem to have stumbled upon an issue whith regards to updating the database with default values (String and DateTime) when a new column is created.
If a new property of DateTime or String is added to an object.
public class Bug
{
public int BugId { get;...
Hi,
I'm using the SimpleRepository in SubSonic 3.0.0.3, and have created the classical example with an order, which contains a collection of order lines:
public class Order
{
...
public IList OrderLines { get; set; }
...
}
However, when saving this one trough the repository (using migrations), the OrderLines property is ignored.
Is i...
I'm following the tutorial here.
I created a new Web Application. I then added two Class Library projects, Common and Domain. The common project contains the SubSonic library while the Domain project contains the SubSonic .tt and .ttinclude files.
After modifying the settings in Settings.ttinclude, I try to 'Run custom tool' on the tt...
Hi,
How can i get the SubSonic 3.0.0.3 source code.
...
I am using SubSonic3 with SQL Server 2000.
I have problem with the method "FirstOrDefault" - it always throws an exception = "Line 1: Incorrect syntax near '('." from the SubSonic.Linq dll
EDIT (Added code from comment):
InventoryDAL = DAL project name (dll)
Inventort= Subsonic3 Gnerated classes
Name space WHWarehouses = gnerated ob...
Hello,
I have a timestamp field in a table and when i create a new instance of my object, set some fields, do not set the timestamp field and use the .Save(), i get an error saying that i cannot set an exlicite value to a timestamp field during an INSERT.
How can i have SubSonic not save anything in that perticular field?
Thank you
...
Hi there,
I need to get the primary key for a row and then insert it into one of the other columns in a string.
So I've tried to do it something like this:
newsObj = new news();
newsObj.name = "test"
newsObj.Save();
newsObj.url = String.Format("blah.aspx?p={0}",newsObj.col_id);
newsObj.Save();
But it doesn't treat it as the same dat...
I'm using AcriveRecord in SubSonic 3.0.0.3 with MySql.
Is there some easy way to perform something like "SELECT CustomerAddress FROM customers" rather than .All() which performs "SELECT * FROM customers"? And how to get distinct values?
...
After running "Run Custom Tool" on the .tt dropped on my VS2k8 prj I'm not able to run my program.. shows 8 errors like:
Error 23 The type 'SouthWind.LanguageText' already contains a definition for 'KeyName' C:\Documents and Settings\Administrador\Meus documentos\Visual Studio 2008\Projects\WindowsFormsApplication4\WindowsFormsApplica...
Using SubSonic 3 ActiveRecord, I generated code from an existing database that had foreign keys. To ensure database schema is always correct when switching databases, I placed migration code at the beginning of the app, using IDataProvider.MigrateToDatabase<MyClass>() for each class generated by ActiveRecord.tt. Turns out, migration code...
Hi using Subsonic 3.0.0.3 it appears there is some issue with Subsonic identifying Stored Procedure paramters as output parameters.
In the StoredProcedures.cs class I find my stored procedure definition but the last parameter is defined incorrectly as a 'AddParameter'.
sp.Command.AddParameter("HasPermission",HasPermission,DbType.Boole...
How do you create binary columns in the DB using SubSonic's Schema builder?
So tonight I decided to dive into SubSonic. I see a lot of questions on here and great responses by Rob and many others. I see that SubSonic is an ORM, with the T4 Templates it can generate some very nice and efficient classes from an existing database.
But, I...
It seems to cause a conversion error: can't convert int16 to int32
...
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<...
hi
i download subsonic 3 today (subsonic 3 preview 2) but this don't work in vb project !
i think because .tt file (for generation) is C# template so this don't generate vb code !
can you help me ? thanks...
...