public async Task <IActionResult> OnPostAsync()
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }

            _context.Attach(WorldFleet).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!WorldFleetExists(WorldFleet.Imo))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(RedirectToPage("./Index", new { message = "Edit successful" }));
        }
        public async Task <IActionResult> OnPostAsync()
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }

            Msd3.DataSourceId           = Msd3.DataSourceId;
            Msd3.ModifiedDate           = DateTime.Now;
            Msd3.LastUpdatedBy          = _userManager.GetUserName(HttpContext.User);
            _context.Attach(Msd3).State = EntityState.Modified;



            try
            {
                if (!Msd3ReportingPortExists(Msd3.ReportingPort))
                {
                    ModelState.AddModelError("CustomError", "There is a problem with the Reporting Port you have added");
                    return(Page());
                }
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!Msd3Exists(Msd3.Id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(RedirectToPage("./Index", new { message = "Submission succesfully updated" }));
        }