retrieve collections via getlist() ?

Posts   
 
    
zee
User
Posts: 35
Joined: 24-Jul-2008
# Posted on: 24-Jul-2008 19:22:44   

Just downloaded the latest llblgen for use with my vs 2008... finally decided to give up coding the entire project and let an ormapper save me time!

I have a Languages table. I have created a Windows form that has a listview that will display all the languages I have a button that allows me to Add a new language

this allows a language being added Dim Languages As New LanguageEntity Languages.Name = txt_LanguageName.Text Languages.Save()

if i run Languages.GetDbCount() i get 1... since i added 1 language... however doing something like this

I want to do something like... Dim Languages As New LanguageCollection Languages.GetList() returns a collection with nothing in it....

i will be using a for each _item as.... in Languages.GetList() ....... to populate a listview...

I will have quite a few drop downs or listviews here and there... any suggestions on how i can get the getlist to work? or if i should be doing things differently? should i create views?

zee
User
Posts: 35
Joined: 24-Jul-2008
# Posted on: 24-Jul-2008 19:25:49   

okay., so maybe i solved my own question

Dim filter As New PredicateExpression() Dim Languages As New LanguageCollection() Languages.GetMulti(filter)

will get me the list without a filter..... is that the correct way to do so?

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 25-Jul-2008 04:35:58   

Hi zee, something like this should be enough.

Dim Languages As New LanguageCollection()
Languages.GetMulti(Nothing)

For more info about collection retrieval, read this manual's section

David Elizondo | LLBLGen Support Team
zee
User
Posts: 35
Joined: 24-Jul-2008
# Posted on: 25-Jul-2008 18:43:11   

cool!., CTO asked me to switch from vb.net to c# simple_smile so looks like ill need to start coding in that... shouldnt be too hard...

I need to read up on the "two class" thingy.. and a few other concepts.. i already have approval to purchase the product., if i can show its use in one of our projects.,

ill be searching for this, but is there a guide on how you should extend the auto-generated code to include your own functions,.

i am thining of using the generated code + custom stored procedures to hand my complex scenarios...

i am also wondering how the generated code/classes play in with Web services.... or more correclty... "best practices"...

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 26-Jul-2008 04:48:12   

zee wrote:

i am also wondering how the generated code/classes play in with Web services.... or more correclty... "best practices"...

You can read this documentation section

You also could download the LLBLGen + WCF example and play with it wink

David Elizondo | LLBLGen Support Team
zee
User
Posts: 35
Joined: 24-Jul-2008
# Posted on: 28-Jul-2008 18:38:16   

daelmo wrote:

zee wrote:

i am also wondering how the generated code/classes play in with Web services.... or more correclty... "best practices"...

You can read this documentation section

You also could download the LLBLGen + WCF example and play with it wink

thanks for the reply... looking at the example structure...

i have not yet switched from .net web services to .net WCF... so couple of things..

is there a specific reason., besides code design... that the service code is seperated into SD.LLBLGen.Pro.Examples.WCF.ServiceInterface and SD.LLBLGen.Pro.Examples.WCF.Service

SD.LLBLGen.Pro.Examples.WCF.Host is something new to me.... in webservices all you had to do was deploy to iis and host the webpage/service... is the host thing a "test/assist" tool?? or is that how it MUST be done? (a way to start and stop the service)

arschr
User
Posts: 894
Joined: 14-Dec-2003
# Posted on: 28-Jul-2008 19:51:26   

. is the host thing a "test/assist" tool?? or is that how it MUST be done? (a way to start and stop the service)

The read-me discusses how to host on iis.

zee
User
Posts: 35
Joined: 24-Jul-2008
# Posted on: 28-Jul-2008 19:53:56   

found a msdn artcile that outlines the various WCF deployment menthods

http://msdn.microsoft.com/en-us/library/bb332338.aspx