Пример #1
0
        public async Task <IActionResult> Create([Bind("Id,UserId,Title,Body")] Sample sample)
        {
            if (ModelState.IsValid)
            {
                _context.Add(sample);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(sample));
        }