Hey there, new to SubSonic and Templates.
I'm compiling my Web Application using VB.net (I didn't notice anywhere that SubSonic requires C#.net and although I can write c# code I am more versed in VB.NET) and I'm having an issue with the ActiveRecord.tt file.
I took the files from the 3.0 download from the "SubSonic_3_0_0_3\SubSonic 3 ...
While I'm new to Subsonic 3.0, I ran into a strange problem. The problem: I can't retrieve new primary ID value after Save(). In recent subsonic versions it was easy, as objects primary key value updated automatically after Save(). But it doesn't seem to hapen with Subsonic 3.0 as it always returns 0 as new primary key ID. Any clues wher...
I am using the latest version of SubSonic 3 and ActiveRecord. I am trying to do a left join in LINQ. It fails with an error somewhere down in SubSonic.
I have a Vehicle object and a VehicleImage object The Vehicle can have multiple images, but it is not required. so a left join is appropriate.
This is what I have
var ve...
I am not running Mike's latest code because it does not build and he didn't update the templates to generate code for the new Load with columns he added. So I am one revision back in the source.
My database has tables in multiple schemas and they would not update properly.
In SubSonic.Query Update.cs I needed to change the constructo...
This SubSonic Update Query:
var db = new Edumatic3DB();
var qry = db.Update<MetaDataKeyBooleans>()
.Set(x => x.Name == metaDataKeyBoolean.name)
.Set(x => x.DefaultValue == metaDataKeyBoolean.defaultValue);
if (metaDataKeyStructureId != -1)
{
qry.Set(x => x.MetaDataKeyStructureId == metaDataKeyStructureId);
}
qry.Where(x => x...
I'm evaluating Subsonic and ran into something in SQL Profiler.
The issue I'm seeing is when doing a linq query to select a single item by pk, the Profiler shows it not as a parameterized query, and under BatchStarting and BatchCompleted.
I did what I think is an identical query using Linq2Sql and got the expected RPC:Completed paramet...
hi,
i have installed vs2010 beta2, create a MVC website, i want to use subsoinc access a mysql database in SimpleRepository, when run the website, i get error: "Unable to find the requested .Net Framework Data Provider. It may not be installed. ".
var repo = new SimpleRepository("NorthwindMySql", SimpleRepositoryOptions.None);
var user...
Hello there, i'm having a issue with the T4 templates for generating code.
I'm wondering if anyone can help me with an issue I have.
I want to store the connection string for use with SubSonic 3.0 in a default location such as the root of the website (Web.Config or a seperate .config file).
This is fine providing the t4 Templates are "...
I have a "Notes" table. Notes support one level of threading - in other words you can reply to a note but cannot reply to another reply. So the table looks something like the following:
CREATE TABLE [dbo].[Notes] (
[NoteId] [uniqueidentifier] ROWGUIDCOL NOT NULL DEFAULT (newid())
CONSTRAINT [PK__Notes]
PRIMARY KEY ([NoteId]),
[...
I have been using the SimpleRepository in Subsonic 3.0.0.3 for several months and I have been very happy with it so far. However I discovered today that it does not support type members of type "byte[]".
Apparently, I'm not the only one who has faced this limitation.
Is there any technical reason why Subsonic does not support this typ...
I have this query:
var rights = from gu in db.GroupUsers
join g in db.Groups on gu.GroupId equals g.GroupId
join gr in db.GroupRights on g.GroupId equals gr.GroupId
join r in db.Rights on gr.RightId equals r.RightId
where gu.UserId == userId && g.IsDeleted == false
select ...
I have a page and it lists bunch of tables in a drop down list. I need to load up a list of columns in the database dynamically. In Subsonic 2.0 it could have been done by Subsonic.Schema.BuildTableSchema but not sure how to do it in 3.0. I tried using the code below but does not work ..
SubSonic.Schema.DatabaseTable D = new SubSonic.S...
Hi , I want to build dynamic search query with subsonic 3.0.
who can help me?
Any sample Please.
...
private Boolean Saveuser(bool isNew)
{
tb_User user = new tb_User();
user.User_Name = txtUserName.Text.Trim();
user.User_LoginName = txtLoginName.Text;
user.User_Password = txtPassord.Text;
user.User_ModifiedBy = clsGlobalVariable.strusername;
user.User_Modified = DateTime.Now;
user.User_IsDeleted = false;
...
What is the full syntax for a stored procedure using SubSonic 3.0? Here is my code which is not working:
DataSet ds = new DataSet();
StoredProcedure sp = test.Usersp_Stock_Search("", 0, "");
sp.ExecuteDataSet();
...
Where can I find an examples of code migration from SubsSonic 2.2 to 3.0.
For example we have Subssonic 2.2 code:
public static void SavePageModules(PageModuleCollection modCol)
{
modCol.SaveAll();
}
How do we write this method for 3.0.
Are Collection deprecated in 3.0.
Best regards.
...
I have the following table in MS SQL Server 2008 Standard Edition:
CREATE TABLE [dbo].[NewTestQueue](
[JobID] [int] IDENTITY(1,1) NOT NULL,
[ServerName] [varchar](50) NULL,
[DomainID] [int] NOT NULL,
[Action] [varchar](50) NULL,
[Folder] [varchar](150) NULL,
[Method] [varchar](50) NULL,
[ActionProfile] [varch...
Just curious if there are plans for eager loading using ActiveRecord in Subsonic 3. Is there a roadmap out there?
It seems like a pretty sweet library. Very similar to Rails but missing a few sweet spots.
...
I have the following set-up.
BlogPosts
BlogToCategory
Category
One blog post can have many categorys and a category can be in many blog posts. (Hence the intermediate table.
How would I go about getting a list of all the blog-posts in one category.
I've tried this but cant seem to get it right (I get a IQueryable -> IEnumerable cast...
How can I get .All() method's result as a DataTable ?
Currently it returns IQueryable, wich can't be used as datasource for the WinForms DataGridView control.
dataGridView1.DataSource = Product.All(); // not working
...