コード例 #1
0
        public async Task Delete(int shopItemFeedbackId)
        {
            var dbContext        = new LMDbContext();
            var shopItemFeedback = await dbContext.ShopItemFeedbacks.FirstOrDefaultAsync(c => c.Id == shopItemFeedbackId);

            dbContext.Remove(shopItemFeedback);
            await dbContext.SaveChangesAsync();
        }
コード例 #2
0
        public async Task Delete(int shopCategoryId)
        {
            var dbContext    = new LMDbContext();
            var shopCategory = await dbContext.ShopCategories.FirstOrDefaultAsync(c => c.Id == shopCategoryId);

            dbContext.Remove(shopCategory);
            await dbContext.SaveChangesAsync();
        }
コード例 #3
0
        public async Task Delete(int articleId)
        {
            var dbContext = new LMDbContext();
            var article   = await dbContext.Articles.FirstOrDefaultAsync(c => c.Id == articleId);

            dbContext.Remove(article);
            await dbContext.SaveChangesAsync();
        }
コード例 #4
0
        public async Task Delete(string knowledgeCategoryId)
        {
            var dbContext         = new LMDbContext();
            var knowledgeCategory = await dbContext.KnowledgeCategories.FirstOrDefaultAsync(c => c.Id == int.Parse(knowledgeCategoryId));

            dbContext.Remove(knowledgeCategory);
            await dbContext.SaveChangesAsync();
        }
コード例 #5
0
    public async Task Delete(string categoryId)
    {
        var dbContext = new LMDbContext();
        var category  = await dbContext.Categories.FirstOrDefaultAsync(c => c.Id == categoryId);

        dbContext.Remove(category);
        await dbContext.SaveChangesAsync();
    }