Ejemplo n.º 1
0
        public ActionResult CreateRod()
        {
            var createRod = new CreateRodViewModel()
            {
                Fishes = db.Fishes.ToList()
            };

            return(PartialView(createRod));
        }
Ejemplo n.º 2
0
        public ActionResult UpdateRod(int Id)
        {
            var rod     = db.FishRods.First(x => x.Id == Id);
            var rodView = new CreateRodViewModel()
            {
                Id = Id, Description = rod.Description, Name = rod.Name, Fishes = db.Fishes.ToList(), Image = rod.Image
            };

            return(View("CreateRod", rodView));
        }