This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Mar 12th, 2011  |  syntax: C#  |  size: 1.20 KB  |  views: 36  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. using System;
  2. using System.Collections.Generic;
  3. using Castle.ActiveRecord;
  4. using Castle.Components;
  5. using System.Linq;
  6. using System.Text;
  7. using Castle.ActiveRecord.Queries;
  8. using NHibernate;
  9.  
  10. namespace YPlaylist.BusinessLogic
  11. {
  12.     [ActiveRecord]
  13.     class Lable : ActiveRecordBase<Lable>
  14.     {
  15.         private int LableID;
  16.         private string LableName;
  17.  
  18.         public Lable()
  19.         {
  20.         }
  21.  
  22.         public Lable(string LableName)
  23.         {
  24.             this.LableName = LableName;
  25.         }
  26.  
  27.         [PrimaryKey]
  28.         private int lableID
  29.         {
  30.             get { return LableID; }
  31.             set { LableID = value; }
  32.         }
  33.  
  34.         [Property]
  35.         private string lableName
  36.         {
  37.             get { return LableName; }
  38.             set { LableName = value; }
  39.         }
  40.  
  41.         public static Lable[] ReturnAllLableNames()
  42.         {
  43.             SimpleQuery<Lable> q = new SimpleQuery<Lable>(typeof(Lable), @"
  44.            Select LableName
  45.            from Lable
  46.            ");
  47.             return q.Execute();
  48.         }
  49.  
  50.  
  51.         internal static Lable[] ExecuteQuery()
  52.         {
  53.             throw new NotImplementedException();
  54.         }
  55.     }
  56. }
clone this paste RAW Paste Data