示例#1
0
        public async Task <ActionResult> AddNew(PersonAddNewModel model)
        {
            IPeronService ps = new PersonService();
            await ps.AddAsync(model.Name, model.Age);

            return(Redirect("/Person/Index"));
        }
        public async Task <ActionResult> AddNew(Models.PersonAddNewModel model)
        {
            IPersonService personService = new PersonService();
            await personService.AddAsync(model.Name, model.Age);

            return(Content("ok"));
        }