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); } }
public Label FindLabelByName(string labelName) { return(LabelDao.FindByName(labelName)); }