Esempio n. 1
0
        public IActionResult DeletePersonFromDB(string email)
        {
            if (email != null && !peopleService.IsValidEmail(email))
            {
                return(BadRequest("Invalid email"));
            }

            if (!peopleService.SearchByEmail(email))
            {
                return(NotFound("User Not Found bl DB aslan"));
            }

            peopleService.DeletePersonFromDB(email);

            return(Ok("Deleted Successfully"));
        }