Beispiel #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            test4Kenneth test4Kenneth = db.test4Kenneth.Find(id);

            db.test4Kenneth.Remove(test4Kenneth);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Beispiel #2
0
 public ActionResult Edit([Bind(Include = "Id,Title")] test4Kenneth test4Kenneth)
 {
     if (ModelState.IsValid)
     {
         db.Entry(test4Kenneth).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(test4Kenneth));
 }
Beispiel #3
0
        public ActionResult Create([Bind(Include = "Id,Title")] test4Kenneth test4Kenneth)
        {
            if (ModelState.IsValid)
            {
                db.test4Kenneth.Add(test4Kenneth);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(test4Kenneth));
        }
Beispiel #4
0
        // GET: test4Kenneth/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            test4Kenneth test4Kenneth = db.test4Kenneth.Find(id);

            if (test4Kenneth == null)
            {
                return(HttpNotFound());
            }
            return(View(test4Kenneth));
        }
Beispiel #5
0
        public ActionResult Index()
        {
            using (var ctx = new IssueManagementDbContext())
            {
                Issue issue = new Issue()
                {
                    Description = "",



                    IssueFieldAgent = new IssueFieldAgent()
                    {
                        Name = "Mimi"
                    }
                };
                ctx.Issues.Add(issue); // Create
                                       //ctx.Issues.ToList(); // List all
                                       //ctx.Issues.Find(1); // Read
                                       //ctx.Entry(issue).State = EntityState.Modified; // Update
                                       //ctx.Entry(issue).State = EntityState.Deleted; // Delete

                //ctx.SaveChanges();

                test4Kenneth kenneth = new test4Kenneth()
                {
                    Title = "Hello"
                };

                test4Jagan test = new test4Jagan()
                {
                    // Id = 01,
                    Title = "Jagan"
                };
            }

            return(View());
        }