Пример #1
0
        public async Task <IActionResult> OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            MyBlogs = await _context.MyBlogss
                      .Include(m => m.User).FirstOrDefaultAsync(m => m.MyBlogsID == id);

            if (MyBlogs == null)
            {
                return(NotFound());
            }
            ViewData["UserID"] = new SelectList(_context.Set <User>(), "UserID", "UserID");
            return(Page());
        }
Пример #2
0
 public IActionResult OnGet()
 {
     ViewData["UserID"] = new SelectList(_context.Set <User>(), "UserID", "UserID");
     return(Page());
 }