subsonic

Error with files generated using SubSonic's SubCommander tool

Hi, I am putting my files onto a production server. On my development machine I currently use the abp file to generate my code. For moving the website onto my production server I thought that I would auto generate the files as I was receiving an error with the abp file as I'm not running it under FullTrust. I ran the following comman...

How to deploy a subsonic application with asp.net MVC

How to deploy the subsonic asp.net mvc application. Do i have to install anything. Please suggest. I am newbie to subsonic. ...

How to use the new Subsonic 3.0 IRepository pattern

Can someone (hopefully Rob) explain how to implement the new SubSonicRepository<> Pattern? I have used it with the old version and the MVC templates (in web forms) using the following initialization. public IRepository<StaffingPosition> _StaffingPositionsRepository; public StaffingBase() { _StaffingPositionsReposi...

Flexible LIKE operator

I'm new to SubSonic. I've been looking for a way to use LIKE operator that let me build SQL query like this: select * from person where lastname like '%bob%', but I could not find a generic way to do this beside inserting string into the quey like q.OR(Person.Columns.FirstName, SubSonic.Comparison.Like, "%bob%"); that is not a prefered...

subsonic object reference not set to object

I created a site with the SubSonic Generator Website I have done this before with few if any issues, however now I can generate and build the site in Visual Studio but I keep getting this error for any of the pages I generate All of this code is generated I have not done anything to it. Object reference not set to an instance of an obje...

SubSonic .Filter() in memory filter

hi guys, i'm having some issues getting the .Filter() method to work in subsonic, and i'm constantly getting errors like the one below: Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. Line 36: bool remove = false; Line 37: System.Reflec...

LINQ IQueryable Help

I have a Menu class that has a IQueryable property called WebPages. In the following statement I am returning Menu items based on a match but I need to include the Webpages property. Here is what I have at the moment. var allCategories = Menu.All().Where(x => x.CategoryID == 4 && x.Visible) I need to extend it to check a property in t...

Reengineer SQL into SubSonic LINQ

I have 11 records in the Menu table, only 1 with a PageID set however if I use var test = Menu.All().Where( x => x.WebPages.Any( pages => pages.Roles.Contains(Roles.GetRolesForUser()[0]) I get 11 records as the SQL run is this SELECT [t0].[CategoryID], [t0].[CreatedBy], [t0].[CreatedOn], [t0].[ID], [t0].[ImageID], [t0].[...

Does Subsonic 3 ActiveRecord Handle Many To Many Relationships?

Does the ActiveRecord template files create classes that handle many to many relationships? ...

Create Foreign Key to ASP.Net Roles table

I have a Pages table, I have a PagesRoles table with PageId, RoleID that links to ASP.Net Membership Roles table and the Pages table. I want to somehow return a Page that links to the currently logged in User's Roles. The User may be in more than one role. A Page can have more than one Role against it. I have a Page class that has a f...

subsonic generate invalid JOIN query

Hello, I'm new to SobSonic and trying to create a join query for two tables. I found the options LeftInnerJoin, which generate the query that seems valid. When trying to run it on MSSQL 2005, it does not work since LEFT INNER JOIN is not valid, but LEFT JOIN. and I'm still looking for way to generate query for joining mutiples tables an...

SubSonic Change DropDown Value for Load Drops SUB

I used the subsonic generator to create some aspx pages, It works fine. On some of the pages it automaticaly generated the dropdown boxes for foreign key values. How Can change that value in the load drops code? Or where I need to change it. For instance I have a workers table and a workersweek table. The workers table has a workeri...

Subsonic 2.2 ASP.NET MVC Unrecognized configuration section

I'm using Subsonic 2.2 Subcommander(Sonic.exe) to generate my DAL in a standalone class library with its own app.config. I'm then referencing this dll assembly in my ASP.NET MVC webapp, and it compiles fine. When I try hitting a page I get "unrecognized configuration section" Here's a screenshot of the error: http://i41.tinypic.com/2h...

Subsonic 3 Union Possible?

I have a schema like so. Menu->Pages->PageRoles->ASPNetRoles Menu has a CategoryID. I want to return all Menu items with a CategoryID of 6. Some Menu items have a foreigh key of PageID. Pages can have 1 or more roles against them. I can check the currently logged in users roles and make sure that they are in the results by joining the...

Is my IQueryable syntax correct?

The generated SQL does a cross join but as the ID's are matched it acts like an inner join but is there a better performing way to do this by actually using the join keyword in C#? Is there a way where you don't have to specify how the properties join because they are all heirarchicly related anyway Item is a Page class PageRoles is an...

Subsonic in Medium trust level

i host my web site in shared hosting server, this server use the default Medium trust level When i execute this ConfigurationDataCollection configurationDatumCollection = new ConfigurationDataCollection().Where(ConfigurationData.Columns.Name, configurationSectionName).Load(); i get this error That assembly does not allow partially t...

Search Database by First and Last Name

I am using ASP.NET with C# and subsonic. I am trying to setup a search on a text field by first and last name. First or Last Name: <asp:TextBox ID="txtSearchName" runat="server"></asp:TextBox> <asp:linkButton runat="server" Text="Send" onclick="btnSubmit_Click" /> <asp:GridView border="0" cellpadding="3" cellspaci...

Column with same name in multiple tables causing problem in SubSonic Select.

Hi folks, there are other question (at least 2 I've seen them) similar to this but I'm not able to solve this using them. Now the problem: I've 3 table from which I need to select 4 columns only. I'm using InnerJoin and it is working perfectly. Problem starts when I add a Where to this Select. I've a column named "Name" in two tables. I...

subsonic in visual studio design host

Hi, I'm facing currently a problem regarding Subsonic configuration. What I want to achieve is using subsonic data access in a System.Web.UI.Design.ControlDesigner class. This class is hosted in Visual Studio Environment and enables design time operations on the attached System.Web.UI.WebControls.Control. The only problem is Sub...

SubSonic 2.2 "Version" Error

I have setup and configured to SubSonic to work with a C# application I am writing. I can generate the data wrapper classes and use them perfectly in my code, but whenever I get ready to script the schema out via the subcommander tool using the arguments "version \out FileLocation", I am getting an error (see error message below). It ...