subsonic

SubSonic 2.2 Automatic Migrations

How would you go about automating the Migrations using SubSonic 2.2 with ASP.NET? Do I need to invoke a sonic.exe in a shell and then capture the results? That seems somewhat of a kludge. My reason for attempting this is... my data structure contains a master table that automatically routes users to their correct company database. ...

Subsonic - how to generate tables which have YYYYMM suffix

.Net 2.0, Vs 2005, Subsonic 2.2, New to subsonic I have tables that are created each month with a YYYYMM suffix. Can a template (or something) to access tables like these be generated? Each month a new one is added so it's no use generating the ones I already have since the code won't work when I need to access a new one. I need a ...

how to use subsonic to read csv file

hi there, i'm supposed to convert a csv file into a nice report for bosses. At first, I didn't even think of programming at all. As a power user of both excel and word, i thought i could get the job done in no time with this, maybe even without any stupid ms macro at all... it turns out i was wrong. so i'm gonna have to program somet...

subsonic with ASP.net MVC2 strongly typed views

Hi, I have an MVC project setup, and I've brought the subsonic Active Record templates into my project, and they generated successfully and I can use the subsonic classes to access my database. However, how do I create a strongly typed view using the subsonic generated classes? When I select "add View" and I check the checkbox to creat...

With Subsonic's SimpleRepository is it possible to store a list or array of Guids

Can I have a class such as the one below, stored in a subsonic's simple repository that has a array of guids? public class TestObject { public Guid Id { get;set; } public Guid[] SomeOtherGuids { get;set; } ... } repo.Add(new TestObject { Id = Guid.NewGuid(), SomeOtherGuids = new Guid[] { Guid.NewGuid() } }); ...

Subsonic : Self Join , Table Alias

Is there a way with subsonic to preform a self join? ...

Subsonic many-to-many relationship

Hi, I have 3 tables, one is called "Users", one is called "Categories" and one is a linking table called "User_Categories_Map" to link users to categories in a many-to-many relationship. The linking table consists of UserId's and CategoryId's. After generating the subsonic classes, I would assume I'd be able to then type User.singleOrD...

SubSonic SimpleRepository storing member class

Hi! I'm new to C# and Subsonic. I'm trying to solve the following case: public class UnknownInt { public int val; public bool known; } public class Record { public int ID; public UnknownInt data; } I'm using SimpleRepository. Is there a way I can get UnknownInt serialized before storing it in the SQL database (perhaps as ...

Subsonic 3.0 How to retrieve all users that belong to specific group in a many to many relationship

Lets say I have a many-to-many relationship: Group table User table group_user table which is a many to many table Given the group name I would like to find all the users that belong to this group. How can I do this with subsonic 3.0? IQueryable<group_user> groupUser= group_user.All(); Is it possible from groupUser to get all use...

Can subsonic handle spatial data. If so how?

Hi, I've been using subsonic for quite a while now and I seem pretty confident about using it in my thesis. What I'm not sure about is how will it handle geometry data types. Anyone has an idea?? ...

SubSonic C# generics

Hi! I'm new to C# and SubSonic (coming from the comfortable C++ world), and I'm trying to understand what I'm doing wrong here: public class TestCycleElement { public int ID {set; get;} public int SessionID {set; get;} public TestCycleElement() { } } public class BloodPressure : TestCycleElement { public BloodPressure() : ...

Best way of expressing Master-Detail in this way?

I have master-detail relationship. Basically I have a list of states and a list of towns per state. I want for it to display something like Oklahoma > Tulsa > Oklahoma City Arizona > Phoenix > etc etc and etc. The city names and the state names are stored in different tables with each city containing a state_id I am using SubSo...

LINQ extension method help sought

Hi all, this is by far my toughest question yet and I'm hoping someone has stumbled upon this issue before and found an elegant answer. Basically, I've got a few linq extension methods (which just happen to be in subsonic but would be applicable in any linq derivative) that are working perfectly (extensions for .WhereIn() and .WhereNotI...

Serialization with Subsonic Generated Objects

Is there any reason why the class 'SubSonic.Repository.SubSonicRepository' in the SubSonic.Core assembly (3.0.0.3) is not marked as Serializable? Or know of a workaround to serialize a subsonic generated class. I added a subsonic generated object into the viewstate and got an error saying the object wasn't marked as Serializable. So I c...

Which DAL approach to take?

ActiveRecord is too limiting normally. However, i'm in a difficult situation in terms of the views held by each member of the team in regards to using ORM's. We currently use a very basic ActiveRecord with regret I say is written mostly by hand with some basic generation of code. I would like to build a new DAL for us but avoiding the li...

Work with relations in Subsonic

Hi, I am using subsonic 3.0.3(ActiveRecords) in my winforms project. I am trying very hard to use Collections for my entities but so far I have been unable to do that . Please allow me to make myself more clear. While going across many tutorials, I have seen, that Subsonic will generate two classes. One is a collection class and the...

SubSonic and MySql character encoding problem

I have a problem with character encoding when using subsonic (3.0.4) and mysql (5.1). I don't know how to specify ISO 8859-2/Latin2 encoding in SubSonic. ...

Subsonic 2.2 SqlQuery with Inner Join and Where

I am trying to convert the following SQL into Subsonic syntax using the SqlQuery functionality: SELECT DISTINCT * FROM FamilyMemberTeamRole FMTR INNER JOIN TeamRole TR ON FMTR.TeamRoleId = TR.TeamRoleId INNER JOIN Team T ON T.TeamId = TR.TeamId LEFT JOIN FamilyMemberClassHistory FMCH ON FMCH.FamilyMemberClassHistoryId = FMTR.FamilyMemb...

Can't find the SubSonicService section of the application config file

Hi When i try to open my MainForm in Visual Studio in the designer, this error pops up instead of the designer of the Visual Studio. Can't find the SubSonicService section of the application config file at System.ComponentModel.ReflectPropertyDescriptor.SetValue(Object component, Object value) at System.ComponentModel.Design.Serializa...

Paging with SubSonic

I am building a MVC 2 application with SubSonic 3 - I have tried many differant paging methods and can find nothing that feels right. I have a basic query that would be passed to a view which would loop and each iteration would call a strongly typed partial view. var SOQuestion= ( from q in repo.All<SOQuestion>() ...