Ejemplo n.º 1
0
        public ActionResult AddContact()
        {
            //create a contact
            var c = new Contact();

            // get the data from the text boxes
            c.Name = Request.Form["Name"];
            c.PhoneNumber = Request.Form["PhoneNumber"];

            //create Fake Db
            var database = new FakeContactDatabase();

            //add the info to db
            database.Add(c);

            //nav to home view
            return RedirectToAction("Index");
        }