Beispiel #1
0
        /// <summary>
        /// Creates a new domain.
        /// </summary>
        /// <returns>Refresh the page.</returns>
        public async Task <IActionResult> OnPost()
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }

            DomainData      domainData     = new DomainData(_db);
            DataDomainModel newDomainModel = new DataDomainModel
            {
                Domain = DisplayDomain.Domain,
                Id     = DisplayDomain.Id,
            };

            await domainData.InsertDomain(newDomainModel);

            return(RedirectToPage("./domain"));
        }