Ejemplo n.º 1
0
        public virtual IActionResult DeleteReport([FromRoute] long TowerId)
        {
            var tower = TowerRepository.Find(TowerId);

            if (tower != null)
            {
                TowerRepository.Remove(tower.TowerId);

                return(new ObjectResult(new ResponseMsg {
                    HttpStatusCode = (int)HttpStatusCode.OK, Message = "Tower deleted successfully."
                }));
            }
            else
            {
                return(new ObjectResult(new ResponseMsg {
                    HttpStatusCode = (int)HttpStatusCode.OK, Message = "Not deleted.tower does not exist"
                }));
            }
        }