Пример #1
0
        public ActionResult Create([Bind(Include = "Id,Name,Email,Phone,Password,IsLocked")] SATAccount userModel)
        {
            if (ModelState.IsValid)
            {
                var model = userModel.Map <Infrastructure.DbContext.User>();
                model.Name = userModel.Username;
                db.Users.Add(model);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(userModel));
        }
Пример #2
0
        // GET: ttn_content/Account/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SATAccount sATAccount = db.SATAccounts.Find(id);

            if (sATAccount == null)
            {
                return(HttpNotFound());
            }
            return(View(sATAccount));
        }