示例#1
0
        public IActionResult AddExperience(LocationExperiencesModel result)
        {
            Experience experience = new Experience();

            experience.Title       = result.Title;
            experience.Description = result.Description;
            experience.LocationId  = result.LocationId;

            db.Experiences.Add(experience);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
        public IActionResult AddExperience(int id)
        {
            var model = new LocationExperiencesModel(id);

            return(View(model));
        }