Exemplo n.º 1
0
 //public ActionResult Details(int id)
 //{
 //    return View();
 //}
 //
 // GET: /Fund/Create
 public ActionResult Create()
 {
     SystemEntities repository = new SystemEntities();
     Fund model = new Fund();
     PopulateViewBag();
     return View(model);
 }
Exemplo n.º 2
0
 public ActionResult Create(Fund fund)
 {
     if(ModelState.IsValid)
     {
         SystemEntities repository = new SystemEntities();
         repository.Funds.Add(fund);
         repository.SaveChanges();
         return RedirectToAction("Index", "Home");
     }
     PopulateViewBag();
     return View(fund);
 }