Ejemplo n.º 1
0
        public ActionResult Delete(long id, string control)
        {
            ContactInformation myContactInformation = _contactInformationRepository.GetById(id);
            long ID = myContactInformation.People.Id;

            _contactInformationRepository.Delete(id);
            const string title = "Informacion Eliminada";

            _viewMessageLogic.SetNewMessage(title, "", ViewMessageType.SuccessMessage);
            return(RedirectToAction("Details/" + ID, control));
        }
Ejemplo n.º 2
0
        public IActionResult DeleteContactDetail([FromRoute] int id)
        {
            try
            {
                _contactInformationRepository.Delete(id);

                return(Ok(new { Message = "Contact information deleted successfully" }));
            }
            catch (Exception ex)
            {
                return(BadRequest(new { Message = ex.Message }));
            }
        }