So I'm doing a postcode lookup available on a database by an external data provider which we are controlling with nHibernate It involves calling a stored procedure and providing a PIN code. In return I get many rows, each of which has more than one column which makes some parts of the address.
We have an address DTO but I am struggling to put DB results in this object because it does not map anything in the database. I am doing this:
string = string.format ("exec addressfindlist.postcode '{0}'", postcode) as a slow spCall in the form of global anhem tran. NHibernate.Transform.iresultTransformer = Global NHibernate.Transform.Transformers.AliasToBean (GetType (Concrete.cms.dat. data transfer objects address)) Dim road as ILIIS (concrete.cms.datrotterfo address address) = session. Creating SQLAqual (Spellal). Settler Transformer (TRAN). Concrete CMS.Data Transfer Objects Address) ()
But certainly no result can be set in an object without any help from the mapping of an object.
The problem, essentially, is that SP gives a list of items, each object (in a row) has sub-objects that correspond to the columns within the row. But I do not see any way to get the sub-commodities. The road list (I, J) will not work and there are no ways or properties on the road which allows me to reach them.
How can I map my data?
Cheers, Matt
You try to load data in a bulk category Can, such as:
Due result (BulkLoadAddressList's) = session. CreateSQLQuery (spCall) .SetResultTransformer (Transformers.luxAddressList) .list (BulkLoadAddressList) ()
more:
Comments
Post a Comment