Base solution for your next web application

Activities of "joshboilered"

I'm having this exact same issue and would prefer to not have to manually migrate all the files to a new solution. Did you ever find out the root cause?

<cite>pkouame: </cite> Ok - making some progress here...

There are definitely issues with both Azure and AWS deployments of this project from Visual Studio using their standard publish/deploy tools and extensions (both azure toolkit and aws toolkit). My PhoneBook app does not deploy completely. See attached screenshots from Chrome developer console pointing to all three (local, Azure and AWS). The view-resources/Areas/App folder in both Azure and AWS are incomplete, notably missing my additions. I don't know why since both deployments report success. This will explain the quirks with the interface.

Local IIS Express - which works...

[attachment=0:2m7bc4m4]PhoneBookDeploy-Local.png[/attachment:2m7bc4m4]

AWS deployment...

[attachment=2:2m7bc4m4]PhoneBookDeploy-AWS.png[/attachment:2m7bc4m4]

Azure deployment...

[attachment=1:2m7bc4m4]PhoneBookDeploy-Azure.png[/attachment:2m7bc4m4]

Looks like (for the moment) I may be better off using the old zip or war file deployment to my instances. Also noticed that the generated Phonebook.html on both Azure and AWS have some missing link-stylesheet tags when compared to the local versions. See below:

--- /Users/me/Desktop/PhoneBookAzure.html	Thu Nov  3 13:31:58 2016
+++ /Users/me/Desktop/PhoneBookLocal.html	Thu Nov  3 13:31:44 2016
@@ -12,16 +12,35 @@
    <link rel="shortcut icon" href="/favicon.ico" />

    
-
-    
        <link rel="stylesheet" href="/fonts/fonts-open-sans.css?v=8lr6XZ3pBBCfcQig2pcgXVEL1BA-lK2a7Efu6CPiQT8" />
-        <link rel="stylesheet" href="/view-resources/Areas/App/Views/_Bundles/layout-libs.min.css?v=MrEb6VO1ckE_u-PLA4eJaz1fj7YXYaE_UNDoro6bDOs" />
-
-        <link rel="stylesheet" href="/Common/_Bundles/common-styles.min.css?v=GME8qyQFRAiGRwoJGMlus_CaGUEei9mVE0ehA5aK_eQ" />
-
-            <link rel="stylesheet" href="/view-resources/Areas/App/Views/Layout/_ChatBar.min.css?v=ErbN4_DMt3OzOVVg1EctfMASmT2CkSG69t8f02efssk" />
-
-        <link rel="stylesheet" href="/view-resources/Areas/App/Views/Layout/_Layout.min.css?v=30idPFJJ8RAuO_LHbic3hBzMsk04bsOrbxXVEc5U1X0" />
+
+        <link rel="stylesheet" href="/lib/jquery-ui/themes/base/all.css?v=NKgjzRBp9mp8Hvpkvw7Jk_0qOK7b1-QBZMzSyqL2hBw" />
+        <link rel="stylesheet" href="/lib/jtable/lib/themes/metro/blue/jtable.css?v=DxiJUAAEjV6_Tw4JvvERoITb7euywp5YpXDrjFlFY3w" />
+        <link rel="stylesheet" href="/lib/simple-line-icons/css/simple-line-icons.css?v=rJyDwHwYGGiGIBhp80kPqVKy1gyk5oPl1-UF2lwetXw" />
+        <link rel="stylesheet" href="/lib/font-awesome/css/font-awesome.css?v=tlDR4ddNyT7oEzbrjwByB7D9mUtxCbqZnOoa5S6IUcg" />
+        <link rel="stylesheet" href="/lib/famfamfam-flags/dist/sprite/famfamfam-flags.css?v=JVJiF3s2_kk99xQHfYhfxo_-Dd52ZIruDMOILwPkqv0" />
+        <link rel="stylesheet" href="/lib/bootstrap/dist/css/bootstrap.css?v=opI27tVP8lfzTdiKv9Wi8UuRkNhIAvZwMVLWtOpRHKk" />
+        <link rel="stylesheet" href="/lib/jquery-uniform/css/uniform.default.css?v=EXB-Xaz2c1X6TvGKN3wrXi_VGn9jhifv8y89TDu3PU4" />
+        <link rel="stylesheet" href="/lib/jstree/dist/themes/default/style.css?v=taGQpm6312cwcLbxB7ACEqe_fP288VZGDXvRqBuLHWo" />
+        <link rel="stylesheet" href="/lib/morris.js/morris.css?v=YM2mAT6Z3Bl89X14nBvhOgTo5bZeRXMimN62teEck84" />
+        <link rel="stylesheet" href="/lib/toastr/toastr.css?v=kKePN_CyxTiMEgsSDu_7z21ru07YOZtR-0UV0JOkt5o" />
+        <link rel="stylesheet" href="/lib/sweetalert/dist/sweetalert.css?v=RRPzTESDGqs41RcefXKeP6vuo538f_0GcitJDQLyCnA" />
+        <link rel="stylesheet" href="/lib/bootstrap-daterangepicker/daterangepicker.css?v=gC3cqLmOTd3WOrdf9pAC6rrF4j3atO9YdOGHodBdhFA" />
+        <link rel="stylesheet" href="/lib/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.css?v=bjyR5Et8wxwD9TCyh72Rq87xKN-Q3zOCuu0RTU6n1-Y" />
+        <link rel="stylesheet" href="/lib/bootstrap-select/dist/css/bootstrap-select.css?v=jq7PDmIVTzXSw3miqS0PfafJ5GSMBo_p2mZw5M388s4" />
+        <link rel="stylesheet" href="/lib/Jcrop/css/Jcrop.css?v=I5jnY2Pr7qJRYNSE3r8YP-Y25UIIgad5xoZ8sc_23W4" />
+        <link rel="stylesheet" href="/metronic/assets/global/css/components-md.css?v=k4_yIK9qsWJHy6gua6udmI7PZOBttyEOfJwBPSUl8Xs" />
+        <link rel="stylesheet" href="/metronic/assets/global/css/plugins-md.css?v=YCCs2A6112yLW3zs0DJryb0mK1o3qLJRGgJ1z1euyM4" />
+        <link rel="stylesheet" href="/metronic/assets/admin/layout4/css/layout.css?v=yDHFA8ZbtQELm_fGpVgzpoGN6qZ0IuBo2WMgbPa1kf8" />
+        <link rel="stylesheet" href="/metronic/assets/admin/layout4/css/themes/light.css?v=_-8jwY5Fnerzrl-_QqzJ2NATsW8LIFtGBqjfYcLkHXk" />
+
+        <link rel="stylesheet" href="/Common/_Bundles/common-styles.css?v=Uzfzz8FNxLMPuqIOTOAa8xpTvSf9NELXBpAtCiq6qEg" />
+
+            <link rel="stylesheet" href="/view-resources/Areas/App/Views/Layout/_ChatBar.css?v=YtKSITQwo4s6jfGv018FO8UL1dMvQK12zFuOSLtbY-Q" />
+
+        <link rel="stylesheet" href="/view-resources/Areas/App/Views/Layout/_Layout.css?v=GBUl9DxZcC5CKd7b_SXd5JcKHF2w1b7tdavDF1FlkJs" />
+    
+
    

    
@@ -119,7 +138,7 @@
                        <span class="username username-hide-on-mobile">
                            <span id="HeaderCurrentUserName">admin</span>
                        </span>
-                        <img id="HeaderProfilePicture" alt="" class="img-circle" src="/Profile/GetProfilePicture?t=636137905709011842"/>
+                        <img id="HeaderProfilePicture" alt="" class="img-circle" src="/Profile/GetProfilePicture?t=636137752245635491"/>
                    </a>
                    <ul class="dropdown-menu dropdown-menu-default">
                        <li class="dropdown-submenu">
@@ -529,9 +548,48 @@
    </div>

    
-
-    
-        <script src="/view-resources/Areas/App/Views/_Bundles/layout-libs.min.js?v=a2DXg2VAP15I1sBirPbF2vZVWGbe5dm7c8F8ijTdycs"></script>
+        <script src="/lib/json2/json2.js?v=w3DjWhUtDqy3bSJKv285C-2kagUtW9F64T9z3xRah8g"></script>
+        <script src="/lib/jquery/dist/jquery.js?v=A5AzdeUZJBV1X2MpcCLHI_iCCTFSpBAn2RvZthKq5AM"></script>
+        <script src="/lib/jquery-ui/jquery-ui.js?v=HZl1ZcSEwE4C-qRo4CngWVteur2bOZhBOGCWLgdZtYI"></script>
+        <script src="/lib/jquery-validation/dist/jquery.validate.js?v=N9-ijTKDOH_onmZ2PxQ7Q5wq1D3qiDZjMWtJ5YPHBpU"></script>
+        <script src="/lib/bootstrap/dist/js/bootstrap.js?v=1fo3W6qowq4PinpCsKshaVqewExoFmzrRBGKbSdAVEk"></script>
+        <script src="/lib/bootstrap-hover-dropdown/bootstrap-hover-dropdown.js?v=DxGviJzh6Az2-Ea5cklfbC8ASBUDodDxBAon8A9K7Jk"></script>
+        <script src="/lib/jquery-slimscroll/jquery.slimscroll.js?v=ESVSX4dkOxamaRoYfcqPM2FfErhgfxS60fp1Fa8ou1w"></script>
+        <script src="/lib/blockUI/jquery.blockUI.js?v=KKcUNqwNyTLaXzvuMyFk6JisiQq6Hk7ZtrciXnEf3Z0"></script>
+        <script src="/lib/jquery.cookie/jquery.cookie.js?v=r9al9t5A6eZ7Vf9q_sZv_0gn53XJlquAyelkqHKpJSM"></script>
+        <script src="/lib/jquery-uniform/jquery.uniform.js?v=ChypsNvFhESQuitxeI8xH7GU0o7d93Bmt8pgy0YZFk8"></script>
+        <script src="/lib/jquery-form/jquery.form.js?v=F5tWvF6sw-sXNQCxAM7utYAXU8nwUMQ2gT0raXiFRmU"></script>
+        <script src="/lib/jtable/lib/jquery.jtable.js?v=ELVLnxPOVhZtu_CAhPrt5Z3ydxWuLV0Az_ZBughuQ7c"></script>
+        <script src="/lib/Jcrop/js/jquery.color.js?v=wkEE2yIvlD9GmprFs6izjjr-UCKcaQbXr4vvU1-hn8M"></script>
+        <script src="/lib/Jcrop/js/Jcrop.js?v=mbYdJt5FCcScMPrOW-IRzQf-gamN31Vx2jTbOyygCOE"></script>
+        <script src="/lib/jquery-timeago/jquery.timeago.js?v=0OBL7Ee2vgqoI5OLcZwxUFaKFMLgZU_OO5MSf5dwB78"></script>
+        <script src="/lib/signalr/jquery.signalR.js?v=F-cltmJT3RDJHr8Vnl6rh6uQLW538cRcW8tmoUUqODA"></script>
+        <script src="/lib/localforage/dist/localforage.js?v=mwWSCeK16_XRRbtdG6jtxZgLE73rqOu_zQp_AKV2ifI"></script>
+        <script src="/lib/morris.js/morris.js?v=O7ZH97JawAgmG1Seh_Y5I3SYWYihlR9ImDKGQvqOngg"></script>
+        <script src="/lib/raphael/raphael.js?v=IkJmfzZMRtECAn3nxxrg7W-H_1Toi4NtRLc-GdnXUj8"></script>
+        <script src="/lib/jquery.sparkline/dist/jquery.sparkline.js?v=u9Mz3Tw4iWrQx5vfczDT_jXcV7-2kuOJtghsfCfx2Vw"></script>
+        <script src="/lib/jstree/dist/jstree.js?v=CcAs5hBEvrLL6hLvBLyweg2LIkxmaHIHyDKsNVUxFJg"></script>
+        <script src="/lib/bootstrap-switch/dist/js/bootstrap-switch.js?v=Ss6sPEX5SsXAc5WsCZElfrZ5vqqEI4HhHACjlFA9p9M"></script>
+        <script src="/lib/spin.js/spin.js?v=b1plKpQIB-XuGyjWec42MhmhpPzEPzFI3OC8Ia0XIoc"></script>
+        <script src="/lib/spin.js/jquery.spin.js?v=i7H7HL08ldqUANgfQInE7LlU2uWUdQMCJ-Q7-_zLutY"></script>
+        <script src="/lib/sweetalert/dist/sweetalert-dev.js?v=8Ax9AbL0t-8T2lGEE7el6KScQAziFlEufyT3R_0F-sU"></script>
+        <script src="/lib/toastr/toastr.js?v=prO6YeBrp6FzpE6glX7_GlSoPssvH4_OmY6Z3YJ2c6c"></script>
+        <script src="/lib/moment/min/moment-with-locales.js?v=5f0RFtuChrGi6osDzegxXWf5yOkmx45i7J9fM1p6P5w"></script>
+        <script src="/lib/moment-timezone/builds/moment-timezone-with-data.js?v=HyyL_iCFfDEonh5Gb9Ab0JlpvpBWkFng8DBRfTci52I"></script>
+        <script src="/lib/bootstrap-daterangepicker/daterangepicker.js?v=C2WqvJPtzNK2_-UETpblIhOe5LarIVKJ7z1KSjsKdbA"></script>
+        <script src="/lib/bootstrap-select/dist/js/bootstrap-select.js?v=Xf73iuF2K_Y9vlRBIWOPhFrfRQokcFiAYuh10tfM298"></script>
+        <script src="/lib/underscore/underscore.js?v=0BUDhy6ZqRFcFqMyBIZf0C34gj_bO2-bk5NuDbpef5A"></script>
+        <script src="/lib/mustache.js/mustache.js?v=yN-KNLfy21JU3TwWfmL2zK_Y8D9zwYKDwxS7UuMTLhs"></script>
+        <script src="/lib/abp-web-resources/Abp/Framework/scripts/abp.js?v=rvXmkuGYaBY5xz1GF3w2h00jfOJpSMBN3UJMpzfwZ84"></script>
+        <script src="/lib/abp-web-resources/Abp/Framework/scripts/libs/abp.jquery.js?v=mKdagSeuFcKYPr59WmgW-xz5P2IPKNKJPGadzFkvp78"></script>
+        <script src="/lib/abp-web-resources/Abp/Framework/scripts/libs/abp.toastr.js?v=QiSp17ew3zyFmdlcKq4HCIOw7UaqE8MC46Ekv50GzPs"></script>
+        <script src="/lib/abp-web-resources/Abp/Framework/scripts/libs/abp.blockUI.js?v=vMuHbqHh635SKL2RG2qsGGCDyHg1yFeGqhPKpS34g4k"></script>
+        <script src="/lib/abp-web-resources/Abp/Framework/scripts/libs/abp.spin.js?v=djoKib6ssm5DDzbXLe5pD7ayfFg3siaoEk-BFYzQlvI"></script>
+        <script src="/lib/abp-web-resources/Abp/Framework/scripts/libs/abp.sweet-alert.js?v=kvr1-s5a2P-iOsLli7RMpO6bfXhKRt2Xs-z-2c-ZC_s"></script>
+        <script src="/lib/abp-web-resources/Abp/Framework/scripts/libs/abp.moment.js?v=G2HzMAp8S4o0Fb7Yn-j6WpodxYmlZUvpuJwjZivD0xA"></script>
+        <script src="/lib/abp-web-resources/Abp/Framework/scripts/libs/abp.jtable.js?v=KcFfILoas9yt3aVhtvcz-pPnAmnBoO3HhsA92gmx-M8"></script>
+    
+
    

    <script src="/Common/Scripts/_empty.js?v=9nBIoscZNpd_d6CmU8ELfANQ63BbUkDGq85hjxF2fXM"></script>
@@ -545,17 +603,19 @@
    </script>

    
-    <script src="/AbpServiceProxies/GetAll?v=636137887898816240" type="text/javascript"></script>
-    <script src="/AbpScripts/GetScripts?v=636137887898816240" type="text/javascript"></script>
+    <script src="/AbpServiceProxies/GetAll?v=636137742340244701" type="text/javascript"></script>
+    <script src="/AbpScripts/GetScripts?v=636137742340244701" type="text/javascript"></script>

    
    <script src="/signalr/hubs"></script>
    <script src="/lib/abp-web-resources/Abp/Framework/scripts/libs/abp.signalr.js?v=xn1vbxcYMCNA89xVbbgjPyBc6neHnAeGvGv2QmbyqJU"></script>

    
-
-    
-        <script src="/view-resources/Areas/App/Views/_Bundles/layout-metronic.min.js?v=QGOWIPzsD2BvoC20hYPkVRJymm6p04Wx4A7M99xyFeA"></script>
+        <script src="/metronic/assets/global/scripts/app.js?v=u-FALiNpMapUM9qjwdTDDlwT2JmylnHSg58gDSIiabw"></script>
+        <script src="/metronic/assets/admin/layout4/scripts/layout.js?v=aMGc57VyU8nABHRpGVeWQgioKedzjjEOBqVwJgnDUUg"></script>
+        <script src="/metronic/assets/layouts/global/scripts/quick-sidebar.js?v=60u7OY9IWjdXr-CpmKRKDsPMY4h9rZaleCQuW9uXaIs"></script>
+    
+
    

    <script type="text/javascript">
@@ -563,16 +623,19 @@
    </script>

    
-
-    
-        <script src="/Common/_Bundles/common-scripts.min.js?v=gjYY7MuNrXGS6meqpxE8ZJW4J2zwFjT01D3d10sS48U"></script>
-        <script src="/view-resources/Areas/App/Common/_Bundles/common-scripts.min.js?v=BwS9FrcFoyF61ki9WwyNssEsagSvJrnuARgcN1Ifk6A"></script>
-        <script src="/view-resources/Areas/App/Views/Layout/_Header.min.js?v=4GtNDIEth6K-ofwHpM0kdAtj3FOiutNjGXN037eFrWk"></script>
-            <script src="/view-resources/Areas/App/Views/Layout/_ChatBar.min.js?v=bWT95LqtSvR_NPNw6GjNY-MqYrem2eybVk6FEw3DHz8"></script>
-    
-
-
-    
+        <script src="/Common/_Bundles/common-scripts.js?v=yefm0CfyeFLkpxISkqykEu_uA7aESyuy7rhWxZShj0Y"></script>
+        <script src="/view-resources/Areas/App/Common/_Bundles/common-scripts.js?v=9YciSQNY9fs5OB4850Ufhjxwx3mh7ld9OlU_kgLVKqM"></script>
+        <script src="/view-resources/Areas/App/Views/Layout/_Header.js?v=6iM-qUfpyGTLtfrSOwwcAvjnJ7GROtIrWi-lRM9x3RQ"></script>
+            <script src="/view-resources/Areas/App/Views/Layout/_ChatBar.js?v=VutWym7KmQEqVrwJ_uhjE2x3qARSBcTeyXOcUoHCGlg"></script>
+    
+
+    
+
+
+    
+    
+        <script src="/view-resources/Areas/App/Views/PhoneBook/_CreatePersonModal.js?v=OCUnYLR_Iqok7fbaKWPtDL3yDZRdj9SO_2g7qyyO65M"></script>
+        <script src="/view-resources/Areas/App/Views/PhoneBook/Index.js?v=uZ5_tgfigaUVVPIIMeUd3vRsjp9xMmTtZ0N48XsEk9o"></script>
    

</body>

Any thoughts? Has anyone encountered similar issues before?

P

<cite>ismcagdas: </cite> Hi,

There are two different things here.

  1. Registration of new host users
  2. Registration of new tenants

The link on the Login page is used for 1. option (Registration of new host users) when you switch to host on login page. This is disabled by default.

The link for Option 2, Registration of new tenants is placed in Home/Index(Fontend section), but it seems like you have deleted the HomeController from your project.

You can put a link to "TenantRegistration/Index" anywhere you like.

Perfect, thanks!

<cite>ismcagdas: </cite> Hi @joshBoilered,

Thanks, I have got the project. I coulnd't have a chance to look at it.

I will get back to you today or tomorrow.

Thanks.

Also, can you have a look at your HostSettingsAppService? I'm following the logic for 'allowing' tenants to self register. When the checkbox is true, it doesn't create a line item in dbo.AbpSettings for "App.TenantManagement.AllowSelfRegistration = true", it just removes it completely. However, when you disable this option, it creates a line item in the dbo.AbpSettings "App.TenantManagement.AllowSelfRegistration = false".

What I'm trying to accomplish is to allow the tenant to self register. If I manually change "App.TenantManagement.AllowSelfRegistration = true", in the db, it doesn't enable the service to show the registration page. If I leave the logic as it is, where if its enabled, there's no dbo record, I still don't see the registration page.

Something is off here, need guidance on fixing the bug.

Thanks. Josh

Hi ismcagdas,

I sent you a copy a couple of days ago, have you had a chance to look?

Thanks.

Josh

Hello,

I've added a menu item to the AppNavigationProvider called 'Reporting'. Under AppFeatureProvider, I've added a new feature called 'Reporting'. Both the feature in the list of features and the navigation menu are displaying 'Reporting'. I've created a new edition called 'Standard + Reporting'. When I setup a new Tenant, I assign this edition to them.

My question is;

How do I restrict the menu item 'Reporting' from displaying in the Navigation if the Tenant is not assigned to the above edition? Is there a parameter in AppNavigationProvider like there is for permissions? I can't find in the documents how you implement features in the UI, only in the controller. Thanks.

e.g.

.AddItem(new MenuItemDefinition( AppPageNames.Tenant.Reporting, L("Reporting"), url: "App/Reporting/Index", icon: "fa fa-excel-o", requiredPermissionName: AppPermissions.Pages_Tenant_Reporting, requiredFeatureName: AppFeature.Pages_Tenant_Reporting ) )

Happy to share it, I'm walking through the PhoneBook Demo trying to do modal form posts to a controller direct for adding the person vs via JS. Using the data annotation, it hits the 'post' method in the controller but the clientside validation is not being triggered.

Where can I post it?

Thanks, ismcagdas.

I understand that the [DisableValidation] attribute on a controller will trigger the controller to allow ModelState.IsValid logic so that we can handle posts to the server manually.

What I'm after is;

  1. I'd like to leave the Javascript work in place, that is, users, roles, etc. I don't want to disable it completely using (Configuration.Modules.AbpMvc().IsValidationEnabledForControllers = false;) otherwise I'm assuming I'd have to rewrite all the pre-built views (users, roles permissions etc) to follow standard MVC convention.

  2. What I'd like to do is, for any new development, I want to route it through the standard convention of the controller, then to the service, then to the dynamically created repo.

For example, if I'm adding a Person domain entity.

In the view, for the 'create' new Person, I'd like to have a partial view with a model for create. On 'create' Person button click, I bring up a modal. The modal has a standard razor view form with a method="Post". The ViewModel for CreatePersonInput has three fields, a FirstName, LastName, Email. I data annotate the First and Last name with [Required]. If the form is not filled out, but the user clicks submit, I want the standard form validation to execute and display the 'This field is required' label. Secondary security layer; if the user disables javascript, I want the Create Controller to have [ValidateAntiforgery] and [HTTPPost] with if (ModelState.IsValid) {} logic.

With the [DisableValidation] annotation, I can implement the secondary security. However, the clientside form validation is not working. What do I need to do to enable client side validation using the standard form post methodology of MVC?

Thank you.

I'm following the step by step tutorial and understanding everything so far. However, while I like JS modal posts, I'm not a JS expert and usually structure the modal to post the form direct to an MVC controller.

Below is my modification to the tutorial. What I'd like to do is target the MVC controller direct, check model state, then call the ApplicationService to Automap to the domain model to post to the db.

The issue I encounter is that button click event (if no data is filled in the fields)doesn't trigger a validation check based on the ViewModel(CreatePersonInput) and the form doesn't post to the MVC controller.

Index Controller

public ActionResult Index(GetPeopleInput input)
        {
            var peeps = _personAppService.GetPeople(input);
            var model = new PersonListViewModel();
            model.People.AddRange(peeps);
            model.NewPerson = new CreatePersonViewModel();
            return View(model);
        }

ViewModel

public class PersonListViewModel
    {
        public PersonListViewModel()
        {
            People = new List<PersonListDto>();
            NewPerson = new CreatePersonViewModel();
        }

        public List<PersonListDto> People { get; set; }
        public CreatePersonViewModel NewPerson { get; set; }
    }

DTO

[AutoMapTo(typeof(Person))]
    public class CreatePersonInput
    {
        [Required]
        public string Name { get; set; }

        [Required]
        public string LastName { get; set; }

        [EmailAddress]
        public string EmailAddress { get; set; }
    }

INDEX View

@using System.Threading.Tasks
@using TwoZero.Web.Areas.App.Startup
@model TwoZero.Web.Areas.App.Models.PhoneBook.PersonListViewModel

@{
    ViewBag.CurrentPageName = AppPageNames.Tenant.PhoneBook;
}

<div class="row margin-bottom-5">
    <div class="col-xs-12">
        <div class="page-head">
            <div class="page-title">
                <h1>
                    <span>@L("PhoneBook")</span>
                </h1>
            </div>
        </div>
    </div>
    <div class="col-xs-12 text-right ">
        <button class="btn btn-primary blue" data-toggle="modal" data-target="#createPerson"><i class="fa fa-plus"></i> New Person</button>
    </div>
</div>
<div class="portlet light">
    <div class="portlet-body">
        <h3>My Peeps</h3>
        <div class="list-group">
            @foreach (var person in Model.People)
            {
                <a href="javascript:;" class="list-group-item">
                    <h4 class="list-group-item-heading">
                        @person.Name @person.LastName
                    </h4>
                    <p class="list-group-item-text">
                        @person.EmailAddress
                    </p>
                </a>
            }
        </div>
    </div>
</div>


@Html.Partial("_CreatePersonModal", Model.NewPerson);

CREATE MODAL

@model TwoZero.Web.Areas.App.Models.PhoneBook.CreatePersonViewModel


@* Create Modal *@
<div class="modal fade" id="createPerson" tabindex="-1" role="dialog">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                <h4 class="modal-title">
                    <span>Create A Person</span>
                </h4>
            </div>
            <form asp-action="CreatePerson" asp-controller="PhoneBook" method="post" role="form" novalidate class="form-validation">
                <div class="modal-body">
                    <div class="form-group form-md-line-input form-md-floating-label no-hint">
                        <input class="form-control" type="text" asp-for="@Model.Name"  >
                        <label>Name</label>
                    </div>
                    <div class="form-group form-md-line-input form-md-floating-label no-hint">
                        <input type="text" asp-for="@Model.LastName"  class="form-control" >
                        <label>Last Name</label>
                    </div>
                    <div class="form-group form-md-line-input form-md-floating-label no-hint">
                        <input type="email" asp-for="@Model.EmailAddress"  class="form-control">
                        <label>Email</label>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn default close-button" data-dismiss="modal">Cancel</button>
                    <button type="submit" class="btn blue save-button"><i class="fa fa-save"></i> <span>Save</span></button>
                </div>
            </form>
        </div>
    </div>
</div>

Create CONTROLLER

[HttpPost]
        [ValidateAntiForgeryToken]
        public ActionResult CreatePerson(PersonListViewModel vm)
        {
            if (ModelState.IsValid)
            {
                var person = vm.NewPerson.MapTo<CreatePersonInput>();

                _personAppService.CreatePerson(person);
            }
            
            return RedirectToAction("Index");
        }

Had a few snags getting a few things setup correctly following the instructions so thought I'd share my 'Getting Started' Step by step "gotcha's" for the next guy not familiar with .net core leveraging .net framework 4.6.1. I'm walking through this now and will update as I run into gotchas not documented.

Enviro setup gotcha's: (or gotme's)

When you download the solution from asp.net zero, you need to do these steps first;

  1. Ensure you have VS2015, update 3 + preview tools
  2. Check the version of your OS and IDE (64 vs 32 bit)
  3. Download the following for your machine environment to aligned to your OS and IDE (I had all the right 64 bit sdk's, but was missing one of the 32 bit) 3.a .net 4.6.1 3.b. .net core 1.1 (earlier versions also needed 1.0.1 in Decemberish version, didn't check if that's changed)
  4. typescript 2

Restart your machine, load Zero and you should be golden to follow the rest of the Getting Started steps.

Step by Step gotchas: (or gotme's)

Although Zero is referencing .Net Framework 4.6.1, its still a .net core application. So you need to use the new localhost db connection string for .net core (if you aren't setting up SQL locally) which has changed since 4.x.

  1. Server=(localdb)\mssqllocaldb; 5.a. Update both connection strings; .web.mvc and .migrator
  2. I had to revert to an older Hangfire version to get it to play nicely.
  3. I'm also finding that if you change the route in Startup.cs to Account/Login, the url's in left nav menu class need to have /Index appended. Haven't figured out why.

TBC... as I dev

sent you a pm, did you receive?

Showing 1 to 10 of 23 entries