This project has moved. For the latest updates, please go here.

LunaEngine use a concept similar to parameter of store procedure, so you have the LunaSearchParameter...

Example, Find all phone number of a Customer

'*****SETTING PARAMETER
Dim Par as new LunaSearchParameter("CustomerID",CustomerIdToSearch)

Dim ListPhone as List (Of Phone) = Nothing

Using Mgr as New TelefoniDAO()
  ListPhone = Mgr.FindAll(Par)
End Using



Example, Find all phone number of a Customer that start with 06

 
'*****SETTING PARAMETER EXPLICITY
Dim Par as new LunaSearchParameter()
Par.FieldName = "CustomerID"
Par.Value = 1

'*****SETTING SECOND IN THE CONSTRUCTOR
Dim Par2 as new LunaSearchParameter("PhoneNumber","06%","LIKE")

Dim ListPhone as List (Of Phone) = Nothing

Using Mgr as New TelefoniDAO()
  ListPhone = Mgr.FindAll(Par,Par2)
End Using

 

Last edited Mar 13, 2014 at 10:49 AM by Lunadix, version 2