This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, I have declared the folowing type in Postgres : create type t_SurroundingArea as (locationid uuid, name text, namepath text, type text); and a procedure returning a set of t_SurroundingArea
CREATE OR REPLACE FUNCTION getsurroundingareas(double precision, double precision) RETURNS SETOF jocwatch.t_surroundingarea AS....
Can anybody tell me how i can call this procedure using lightspeed? Thank you.
|
|
|
You'll need an entity type to return into: public class GetSurroundingAreasResult : Entity<Guid> { Then use Find(ProcedureQuery): _unitOfWork.Find<GetSurroundingAreasResult>( (Your function declaration as written has two parameters with the same name -- I assume this is a typo.) If you use the designer then LightSpeed will generate a friendly wrapper for you and you'll be able to write: _unitOfWork.getsurroundingareas(precision1, precision2); |
|
|
Oops, missed one thing on the entity declaration. Since the ID is called locationid rather than Id, you'll need: [Table(IdColumnName="locationid")] on the GetSurroundingAreasResult class. If you're using the designer, this can be specified via the Identity Column Name setting. |
|