Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > Designer> Map a scalar function call in the designer
 

Pages: 1
Designer
Map a scalar function call in the designer
Page:1/1 

  Print all messages in this thread  
Poster Message
wtijsma
User



Location:
Amsterdam
Joined on:
18-Apr-2006 15:46:26
Posted:
252 posts
# Posted on: 07-Apr-2015 15:43:25.  
Hi,

Is there a way I can map a scalar function call in the designer to generate type-safe calls to it?

What's the easiest way nowadays in LLBLGen 4.2 to simply execute a scalar function and get the value from it?

Thanks

Wiebe
Wiebe Tijsma
http://www.netindustry.nl | http://www.twitter.com/wtijsma
 
Top
Walaa
Support Team



Location:

Joined on:
21-Aug-2005 16:03:48
Posted:
14584 posts
# Posted on: 07-Apr-2015 21:27:32.  
You can build a Scalar Query in code, several ways to do that depending on the case.
e.g. adapter.GetScalar(...);

But your case seems different as you want to call a database function that is scalar.

And if the call is not part of a query, like calling the function in a predict or in the select list, then your best bet would be to include it in a StoredProcedure, and get an SP call mapped.

If not scalar, then you can have a TableValuedFunction call mapped in the designer.


  Top
hotmail
User



Location:
chicago
Joined on:
06-Feb-2013 05:17:38
Posted:
44 posts
# Posted on: 08-Apr-2015 20:16:54.  
Is there something in v5 that allows us to map scalar value function directly without creating an SP and is strongly typed?
  Top
daelmo
Support Team



Location:
Guatemala City
Joined on:
28-Nov-2005 23:35:24
Posted:
8108 posts
# Posted on: 09-Apr-2015 08:23:48.  
hotmail wrote:
Is there something in v5 that allows us to map scalar value function directly without creating an SP and is strongly typed?

No. You have to either code it at DB (SP or View) or at generated code, but not in the model.


David Elizondo
LLBLGen'ing (articles and code snippets) | linkedin | twitter
 
Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37860 posts
# Posted on: 09-Apr-2015 09:37:48.  
For v5 it's considered, but nothing is set in stone yet.
Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
wtijsma
User



Location:
Amsterdam
Joined on:
18-Apr-2006 15:46:26
Posted:
252 posts
# Posted on: 09-Apr-2015 21:20:55.  
Walaa wrote:
You can build a Scalar Query in code, several ways to do that depending on the case.
e.g. adapter.GetScalar(...);

But your case seems different as you want to call a database function that is scalar.

And if the call is not part of a query, like calling the function in a predict or in the select list, then your best bet would be to include it in a StoredProcedure, and get an SP call mapped.

If not scalar, then you can have a TableValuedFunction call mapped in the designer.


Cool, thanks a lot. For now wrapping it in a sproc seems like the easiest.


Wiebe Tijsma
http://www.netindustry.nl | http://www.twitter.com/wtijsma
 
Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.