Beispiel #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            AppUser appUser = _appUserManger.GetBy(id);

            _appUserManger.Remove(appUser);
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            AppUserManger _repository = new AppUserManger();
            //RoleManger _repository = new RoleManger();

            //Role MyRole = new Role() { Id = 1, Name = "JOJO" };
            //AppUser appUser = new AppUser() { Name = "jojo", RoleId = 1, Address = "Egypt" };
            AppUser appUser = _repository.GetBy(2);

            _repository.Remove(appUser);

            Console.ReadKey();
        }