Exemplo n.º 1
0
        public bool Delete(int id)
        {
            IUserBDC userBDC           = (IUserBDC)BDCFactory.Instance.Create(BDCType.UserBDC);
            OperationResult <bool> val = userBDC.DeleteUser(id);

            if (val.IsValid())
            {
            }
            return(val.Data);
        }
Exemplo n.º 2
0
        private static void DeleteUser()
        {
            Console.Write("Please enter the User ID: ");
            int deleteId = int.Parse(Console.ReadLine());

            if (userBDC.DeleteUser(deleteId))
            {
                Console.WriteLine("User with Id: {0} has been successfully deleted.", deleteId);
            }
            else
            {
                Console.WriteLine("User with Id: {0} could not be deleted. Please try again.", deleteId);
            }
        }