Пример #1
0
        public IActionResult CurtManagement()
        {
            var model = new CurtManagementModel()
            {
                Curts = _context.Curts.ToList()
            };

            return(View(model));
        }
Пример #2
0
        public IActionResult CurtManagement(CurtManagementModel model)
        {
            var curt = new Curt()
            {
                Name = model.Name
            };

            _context.Add(curt);
            _context.SaveChanges();
            return(RedirectToAction("CurtManagement", "Admin"));
        }