예제 #1
0
        public bool Delete(int id)
        {
            var category = GetById(id);

            if (category != null)
            {
                context.Categories.Remove(category);
                return((context.SaveChanges() > 0) ? true : false);
            }

            return(false);
        }
예제 #2
0
        public bool Delete(int id)
        {
            var tagsLinkRecord = GetById(id);

            if (tagsLinkRecord != null)
            {
                context.TagsLinkRecords.Remove(tagsLinkRecord);
                return((context.SaveChanges() > 0) ? true : false);
            }

            return(false);
        }
예제 #3
0
        public bool Delete(int id)
        {
            var originalUrl = GetById(id);

            if (originalUrl != null)
            {
                context.OriginalUrls.Remove(originalUrl);
                return((context.SaveChanges() > 0) ? true : false);
            }

            return(false);
        }
예제 #4
0
        public bool Delete(int id)
        {
            var type = GetById(id);

            if (type != null)
            {
                context.Types.Remove(type);
                return((context.SaveChanges() > 0) ? true : false);
            }

            return(false);
        }
예제 #5
0
        public bool Delete(int id)
        {
            var language = GetById(id);

            if (language != null)
            {
                context.Languages.Remove(language);
                return((context.SaveChanges() > 0) ? true : false);
            }

            return(false);
        }
예제 #6
0
        public bool Delete(int id)
        {
            var linkRecord = GetById(id);

            if (linkRecord != null)
            {
                var tagsList = context.TagsLinkRecords.Where(c => c.LinkRecordId == id);

                context.TagsLinkRecords.RemoveRange(tagsList);
                if (context.SaveChanges() > 0)
                {
                    context.LinkRecords.Remove(linkRecord);
                    return((context.SaveChanges() > 0) ? true : false);
                }
            }

            return(false);
        }