Example #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            ProfileMeta profileMeta = db.ProfileMetas.Find(id);

            db.ProfileMetas.Remove(profileMeta);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Example #2
0
 public ActionResult Edit([Bind(Include = "ID,Username,password,ProfileDetailID")] ProfileMeta profileMeta)
 {
     if (ModelState.IsValid)
     {
         db.Entry(profileMeta).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.ID = new SelectList(db.ProfileDetails, "ID", "UserName", profileMeta.ID);
     return(View(profileMeta));
 }
Example #3
0
        // GET: Login/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ProfileMeta profileMeta = db.ProfileMetas.Find(id);

            if (profileMeta == null)
            {
                return(HttpNotFound());
            }
            return(View(profileMeta));
        }
Example #4
0
        // GET: Login/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            ProfileMeta profileMeta = db.ProfileMetas.Find(id);

            if (profileMeta == null)
            {
                return(HttpNotFound());
            }
            ViewBag.ID = new SelectList(db.ProfileDetails, "ID", "UserName", profileMeta.ID);
            return(View(profileMeta));
        }
Example #5
0
 private Profile(ProfileMeta meta, IOptions <ManagementOptions> options, IFileSystem fileSystem)
 {
     _options    = options;
     _fileSystem = fileSystem;
     ProfileMeta = meta;
 }