コード例 #1
0
ファイル: SchoolsController.cs プロジェクト: yangwensb/myDojo
        public CommandActionResult <CreateNewDojo> Create(CreateSchoolForm form)
        {
            var address = new Address
            {
                State        = form.State,
                City         = form.City,
                PostalCode   = form.PostalCode,
                Street       = form.StreetName,
                StreetNumber = form.StreetNumber,
            };

            return(Command(
                       new CreateNewDojo(_currentUserProvider.CurrentLoggedInUser().Id, form.Id, form.Name, address, form.Description),
                       () => RedirectToAction("List", "Schools")));
        }
コード例 #2
0
ファイル: SchoolsController.cs プロジェクト: yangwensb/myDojo
        public ActionResult Create()
        {
            var model = new CreateSchoolForm();

            return(ContextualView(model));
        }