Пример #1
0
        public async Task <ActionResult> Create(DirectionDto value)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    await db.Create(value);

                    return(RedirectToAction("Index"));
                }
            }
            catch
            {
                ModelState.AddModelError("", "Unable to save changes. Try again, and if the problem persists see your system administrator.");
            }
            return(View(value));
        }