Example #1
0
        public IActionResult DeleteContact(string id)
        {
            if (context.Contacts.Find(id) == null)
            {
                return(Ok("Null"));
            }
            else
            {
                context.Remove(context.Contacts.Find(id));
                context.SaveChanges();

                return(Ok("True"));
            }
        }
        public IActionResult DeleteNotification(string id)
        {
            if (context.Notifications.Find(id) == null)
            {
                return(Ok("null"));
            }
            else
            {
                context.Remove(context.Notifications.Find(id));
                context.SaveChanges();

                return(Ok("true"));
            }
        }