コード例 #1
0
        public static Label Delete(string name)
        {
            var db = DbFactory.Create();

            var label = LabelCache.GetLabel(name);

            if (label != null)
            {
                label = db.DeleteLabel(label);
                LabelCache.Reset();
            }

            return(label);
        }
コード例 #2
0
        public static Label Create(string name, string color)
        {
            var db = DbFactory.Create();

            //contruct label object
            var label = new Label()
            {
                Name  = name,
                Color = color
            };

            label = db.CreateLabel(label);
            LabelCache.Reset();

            return(label);
        }