|
|
|
@ -5,8 +5,10 @@ using Infrastructure.Data;
|
|
|
|
|
using Infrastructure.Extensions;
|
|
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
|
|
namespace IoT.Shared.Areas.Admin.Controlls
|
|
|
|
|
{
|
|
|
|
@ -31,7 +33,7 @@ namespace IoT.Shared.Areas.Admin.Controlls
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
this.Repo.Delete(this.Repo.FindBy(id));
|
|
|
|
|
this.Repo.Delete(this.Repo.Table().Include(o => o.Scenes).FirstOrDefault(o => o.Id == id));
|
|
|
|
|
this.Repo.SaveChanges();
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|