示例#1
0
 public Label Create(Label label)
 {
     label.name = label.name.ToLower();
     try
     {
         LabelDao.FindByName(label.name);
         throw new DuplicateInstanceException(label,
                                              typeof(Label).FullName);
     }
     catch (InstanceNotFoundException)
     {
         label.commentsNum = 0;
         LabelDao.Create(label);
         return(label);
     }
 }
示例#2
0
 public Label FindLabelByName(string labelName)
 {
     return(LabelDao.FindByName(labelName));
 }