OK
This commit is contained in:
@@ -66,4 +66,18 @@ public class DeviceController : ControllerBase
|
|||||||
return Created();
|
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