subsonic

How do I get the combobox value?

I usually do web programming but have a requirement for a windows form in this project I'm working on now. I'm using SubSonic to get a list of jobs and load a combobox: JobCollection jobs = new JobCollection().Load(); cboJobs.DisplayMember = "Name"; cboJobs.ValueMember = "Id"; cboJobs.DataSource = jobs; When the user selects an ite...

Subsonic alias query - how?

I am trying to build the following query: `new Select("GTekst = ArrGruppe.Tekst", "GLTekst = ArrGruppeLinie.Tekst") .From(ArrGruppeLinie.Schema) .InnerJoin(ArrGruppe.IdColumn, ArrGruppeLinie.ArrGruppeIDColumn) .Where(ArrDeltager.Columns.Kategori).IsLessThan(20) .And("Arrgruppe.Tekst").Like("mytext");` It generates a flawed query becau...

Converting a collection.foreach from c# to VB.Net

In C# i just put the method in the parentheses that i want to run on each row of the collection, but it isn't working in VB.NET. ex: SubSonic.PartCollection Parts; ... Parts.ForEach(TestMethod); I've tried this in VB.Net, but it's not compiling, and i'm not quite sure what I'm missing. Dim Parts as SubSonic.PartCollection ... parts....

Learn SubSonic before NHibernate or Vice Versa?

We've been using our own DAL for our projects in our company and for the passed 2 projects this has causing us problems. Because of this I want to study SubSonic and/or NHibernate. Is it better to study SubSonic first or NHibernate? What are the advantages/disadvantages? From what I have read from related questions here NHibernate is mor...

Subsonic Repository BuildUpdateQuery Bug?

I am using ActiveRecord and when I call Model.Save which calls repositry.Update and then BuildUpdateQuery, it checks to see if item is ActiveRecord and then return dirty columns. I don't have any dirty columns. I assume this is because I haven't changed anything on my model but the problem is is that it continues to try and update the ...

How do I do a or select when using subsonic?

Here is my code: TransactionCollection transactions = new TransactionCollection(); transactions.Where("next_action", "RESEND"); transactions.Where("job_id", CurrentJob.Id); transactions.Load(); I really want it to say next_action is RESEND or next_action is TARGET. Thanks. Basically I want a select statemnt like this: select * ...

SubSonic Paging Syntax Help

I am struggling to get a subsonic select query to work, I am writing a paging method and tried the following Select ns = new Select(maincolumns.ToArray()); ns.PageSize = 10; ** Error Here ** ns.PageIndex = 1; ** And Error Here ** ns.Where("IsLive").IsEqualTo(true); ns.And("Title").Like("%" + SearchTerm + "%"); ns.OrderAsc("RentalExV...

How to perform a table UNION in SubSonic

I have a query that performs a UNION between two tables. I'm trying to implement the same thing with SubSonic. I have two related questions: What is the SubSonic syntax to perform a union. How do I rename a column. Assuming the UNION will require to match the column names between the two tables ...

Nested ShareDbConnectionScope blocks

Does a ShareDbConnectionScope using block in subsonic nested inside another SharedDbConnectionScope using block automatically use the connection of the parent connection scope? ...

SubSonic and app.config in Windows Form

As it should be the file app.config in an application Windows Form so that the given access classes her they generate automatically in the build? ...

How to using select with multi table in SubSonic query ?

Hi, I am new with SubSonic and have a problem with query. This is my query string string sql = "SELECT *" + " FROM tbl_exrates, tbl_currency" + " WHERE date = " + d; " AND tbl_exrates.currency = tbl_currency.cid" + " AND (cash > 0 OR transfer > 0 OR sell > 0)"; How to convert it to...

Using SubSonic Query to on multiple tables

I want to select rows from multiple tables using subsonic. For one table I can use Query object, but I don't know how I can add more than one tables to query. ...

Saving related objects in SubSonic

I have 2 tables, Order and OrderItem, which have a 1-many relationship. When I am adding a new order at the front end, how to I create the relationship. E.g. (Order and OrderItem generated by SubSonic). Order order = new Order(); //populate order details. OrderItem item = new OrderItem(); //populate orderItem details. How do I then...

populating a datagridview combobox column with subsonic & vb.net

Like the title says, I'm trying to populate a combo box column in a datagridview. Here's what i have so far: Dim lc As System.Web.UI.WebControls.ListItemCollection = _ DataAccess.Part.GetListItems() dgvcboPart.DataSource = lc ' This is a standalone combo box and it works ok cboTest.DataSource = lc Any suggestions as to what I'm...

SubSonic and Paging using ROW_NUMBER ()

How to enable ROW_NUMBER () with SubSonic to do paging? ...

ASP.Net MVC FormCollection VS ModelBinding Efficiency

I am using Subsonic 3 ActiveRecord approach and was wondering what was most efficient in terms of posting data. Here are the 2 scenarios: i) public ActionResult Edit(Person PostedItem) { Person p = new Person(PostedItem.ID); p.Name = PostedItem.Name; p.Update(); } ii) public ActionResult Edit(FormCollection P...

How to use Subsonic MVC Template?

I started downloading the MVC Template, and created a new project using this template. I Compiled the application, and everything went fine so far. My question is, where could i find the new sonic.exe file that generates the MVC DAL? Is that the old sonic.exe? ...

What happened to the Subsonic CMS/Starter Site

I think SubSonic used to have CMS (or Start Site) web application available, but for the life of me I can't find it. Rob mentioned it on his blog a year ago when he moved the site to Graffiti CMS, and the Google Code project site has a reference to it to: A solid foundation from which to extend. Our starter site comes pre-wired with...

Column does not exists in datasouruce problem when binding SubSonic collection to dropdown.

I've a table with Primary Key with _ (underscore) in its name like: User_Id. When SubSonic generates DAL it removes underscores. Now I'm binding the object collection to DropDownList like follows: private void LoadCbo() { UserCollection users=(new UserCollection()).Load(); User u=new User(){ UserId=-1, Name="[Sel...

Primary key composed

Customer customer = new Cliente(4); In the code an object customer is created locating through IdCliente = 4 How would to create an object customer that possesses a primary key composed, to idEmpresa and idCliente? ...