Primary key composed

subsonic

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?

Best Answer

I think you're asking if you can load an subsonic object that has a composite key.

Customer customer = new SubSonic.Select()
  .From(Customer.Schema)
  .Where(Customer.IdEmpresaColumn).IsEqualTo(idEmpresa)
  .And(Customer.IdClienteColumn).IsEqualTo(idCliente)
  .ExecuteSingle();

Please read http://subsonicproject.com/querying/select-queries/.

Related Topic