Esempio n. 1
0
 public static IEnumerable<SysTakeawayDirectory> LoadMenuDirectory(int companyID)
 {
     var query = DB.Select( ).From<SysTakeawayDirectory>( )
                   .Where(SysTakeawayDirectory.CompanyIDColumn).IsEqualTo(companyID);
     using (var dr = query.ExecuteReader( ))
     {
         while (dr.Read( ))
         {
             SysTakeawayDirectory dir = new SysTakeawayDirectory( );
             dir.Load(dr);
             yield return dir;
         }
     }
 }
Esempio n. 2
0
 public static IEnumerable<SysTakeawayDirectory> LoadMenuDirectory( )
 {
     using (var dr = SysTakeawayDirectory.FetchAll( ))
     {
         while (dr.Read( ))
         {
             SysTakeawayDirectory dir = new SysTakeawayDirectory( );
             dir.Load(dr);
             yield return dir;
         }
     }
 }