Exemplo n.º 1
0
        public ActionResult AddFamily(Family family)
        {
            FamilyDb db = new FamilyDb(Properties.Settings.Default.ConStr);

            db.AddFamily(family);
            return(Redirect("/"));
        }
Exemplo n.º 2
0
        public ActionResult Index()
        {
            IndexViewModel ivm = new IndexViewModel();
            FamilyDb       db  = new FamilyDb(Properties.Settings.Default.ConStr);

            ivm.Families = db.GetFamilies();
            return(View(ivm));
        }