OK
This commit is contained in:
1 parent
57aebb7b1c
commit
73a4e0b5bb
1 file changed
+14
@@ -66,4 +66,18 @@ public class DeviceController : ControllerBase
|
||||
return Created();
|
||||
}
|
||||
}
|
||||
|
||||
//========================= DELETE ====================================//
|
||||
[HttpDelete("DelType")]
|
||||
public IActionResult DelType(int id)
|
||||
{
|
||||
using (var db = new SQLiteService())
|
||||
{
|
||||
var deldev = db.DeviceTypes.Where(u => u.Id == id).FirstOrDefault();
|
||||
db.DeviceTypes.Remove(deldev);
|
||||
db.SaveChanges();
|
||||
return Ok();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user