Пример #1
0
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            AppUser appUser = _appUserManger.GetBy(id);

            if (appUser == null)
            {
                return(HttpNotFound());
            }
            return(View(appUser));
        }
Пример #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();
        }