I'm eagerly about to install SubSonic 3 and start using it with one of my sites, but I'm already confused right at the beginning!?
The install instruction states
*Grab the folder containing the T4 templates (the "tt" extensions) and locate the one that named "Settings". Open it up in Notepad and set the value for "ConnectionStringName"...
Hi, when using the SimpleRepository in SubSonic 3, the partial void OnValidate is never called. When and where should I be doing validations?
...
When I bind a SubSonic 3 produced IQueryable result to the ItemsSource of a WPF ComboBox or DataGrid, I'm unable to change the selected item in the ComboBox or the DataGrid more than once. I'm using SubSonic 3.0.0.3 and ActiveRecord.
Here's an example:
In my code:
var foo = FooDB.Customer.All();
FooComboBox.ItemsSource = foo;
In my...
I am new to Subsonic, and it seems that I cant find out a natural way to do CRUD operations using the LINQ template classes. I guess in ActiveRecord, you could:
Product p = new Product();
p.ProductCode = "xxx";
p.Add();
Using the LINQTemplate generated classes however, how can I do the same thing? I can only use something like this ...
Why I'm having this error "Object of type 'System.UInt16' cannot be converted to type 'System.Int16" when I'm trying to run below code
public ActionResult List()
{
var x = account.All();
return View(x);
}
The errors showed up, when it's try to iterate my model in my List.aspx file (below code).
<% foreach (var item in ...
Hi,
I'm getting the following error in subsonic:
Can't decide which property to consider the Key when trying to run this code:
var book = repository.Single<Libro>(l=>l.Prefix==capitulo[0]);
I already rerun the t4 templates and still get the same error. Any advice? thanks.
...
I want to use subsonic 3.0 SimpleRepository in my project, but there is a problem :
If my table's name like Product etc. then i can't get any data from database,
because subsonic generate the sql statement like "Select * from Products ..."
PS: I don't want to change my table name
I write a t4 template to solve this problem, i hope so...
I am using sql server 2008, to follow the latest convention I used new schema other than [dbo].[tablename] which is now look like this [newdbo].[tablename]. The problem now, SimpleRepository could not locate [newdbo].[tablename], I assumed it is looking for [dbo] rather than [newdbo], since my class is define as:
here's my Table: Schem...
We have this:
repository.Add<Customer>(c);
...
IQueryable<Customer> result1 = repository.All<Customer>();
Console.WriteLine( result1.Count() );
IQueryable<ICustomer> result2 = result1.Cast<ICustomer>();
Console.WriteLine( result2.Count() ); // error here
Expression of type 'System.Collections.Generic.IEnumerable1[Data.Customer]' canno...
Hi,
I am trying to do server-side paging with Subsonic. Using the .Paged function works well (the link to the webcast seems to be broken btw). However, how do I go the total number of records from my query (without the .Paged function) i.e. do I need to run a recordcount on the query which returns the full result first? If yes, then it k...
I updated to the version 3.0.0.3. Dragged the new ActiveRecord directory in VS08, and added the newer dll.
I'm not sure whats going on yet. When I try to compile the project I get that error.
My SVN server just lost my old version, so I'll have to download the older Subsonic version and see if that fixes the problem. I have no clue ...
Ok I have following the tutorial here as best I can
http://subsonicproject.com/docs/Setting_up_SubSonic_3.0
As the files you get in the download are nothing like what is shown in the video?? So I am literally just guessing which files to use??
Then I drag the files / folders into Visual studio (As the video shows) and NOTHING happen...
Running the latest version of SubSonic (3.0.0.3). Retreiving a single record, making one field change and calling .Save results in a null reference exception in the code below:
public void Update(IDataProvider provider){
if(this._dirtyColumns.Count>0)
_repo.Update(this,provider);
OnSaved();
}
My code to...
I write code with SubSonic 2.1.1 and used MSSQL. The project must be run with Oracle now.
I changed web.config, and it does not work. Can someone give me a sample which changes database only - changes web.config with subsonic and the rest doesn't change?
Table name in MSSQL is "Name" but in Oracle is "NAME". Can subsonic
generate "Name"...
I used subsonic 3 with T4,It's very simple to use.But I get a problem now.I specify the default value in the sqlserver 2005.Then I called save() method in subsonic.I found the default value doesn't work.
...
I get this error when i try and edit a row on the tables that have keys connecting to the "AvailableHostname" table. All other tables edit fine.
How can i fix this?
Thank you so much for your help in advance.
The error:
Multiple controls with the same ID 'AvailableHostname' were found. FindControl requires that controls have unique IDs....
I have a migration (v2) that creates a table and adds some columns:
TableSchema.Table layouts = CreateTableWithKey("Layouts");
layouts.AddColumn("UserID", DbType.UInt32);
layouts.AddColumn("WidgetID", DbType.UInt32);
layouts.AddColumn("Section", DbType.UInt32);
layouts.AddColumn("Rank", DbType.Int32);
Another migration (v3) adds a col...
I have trouble using the transactionscope on SQLite, i am using the following code. Changes are still commited to the database while i don't call the ts.Complete() function.
Using ts As New System.Transactions.TransactionScope()
Using sharedConnectionScope As New SubSonic.SharedDbConnectionScope()
' Do your individual saves here' ...
I usually write my domain object names in its native language, and pluralization of those name will look very ugly, can you turn if of some how?
...
Hi guys,
I am playing around with Subsonic 3's simple repository and am hitting walls in understanding how to deal with foreign keys...
If I have a product object containing
int ID;
string name;
string description;
Category category;
int categoryID (this one is just to persist the product's categoryID to the DB)
and a categor...