예제 #1
0
        public IActionResult Create(Dog dog, string file)
        {
            if (file != null)
            {
                dog.ProfilePicture = file;
            }
            Dog d = repository.Create(dog);

            return(RedirectToAction("Detail", "Dog", new { id = dog.Id }));
        }
 public IActionResult Create(Dog dog)
 {
     _repository.Create(dog);
     return(RedirectToAction("Index"));
 }