Advertisement
Guest User

Untitled

a guest
Mar 12th, 2011
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.20 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement