Пример #1
0
        public async Task <IActionResult> Create([Bind("DogID,UserID,ImageUrl,Breed,FirstName,LastName,Birthday,SpecialRemarks,Misc")] OwnerDog ownerDog)
        {
            if (ModelState.IsValid)
            {
                _context.Add(ownerDog);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(ownerDog));
        }
Пример #2
0
        public async Task <IActionResult> Create([Bind("ImageUrl,Breed,HealthConcerns,HypoAllergenic,GroomingRequirements,Size,ExerciseRequirement,FamilyFriendly,DogFriendly,FoodTypes")] DogBreed dogBreed)
        {
            if (ModelState.IsValid)
            {
                _context.Add(dogBreed);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(dogBreed));
        }
Пример #3
0
        public async Task <IActionResult> Create([Bind("UserID,UserName,Password,FirstName,LastName,PhoneNumber,Email")] UserAccount userAccount)
        {
            if (ModelState.IsValid)
            {
                _context.Add(userAccount);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(userAccount));
        }