Beispiel #1
0
 public ActionResult Delete(Guid id, Employer e)
 {
     try
     {
         e.EmployerDelete();
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View(e));
     }
 }
Beispiel #2
0
        public ActionResult Delete(Guid id, Employer e)
        {
            try
            {
                // TODO: Add delete logic here
                e.EmployerDelete();

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View(e));
            }
        }
Beispiel #3
0
        public void DeleteTest()
        {
            Employer employer = new Employer();

            employer.EmployerId = Guid.Parse("aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa");
            employer.EmployerDelete();

            ITIndeedEntities dc = new ITIndeedEntities();

            var users = dc.tblUsers;

            int expectedUsers = 17;

            int actualUsers = users.Count();


            var employers = dc.tblEmployers;

            int expectedEmployers = 5;

            int actualEmployers = employers.Count();

            Assert.AreEqual(expectedEmployers + expectedUsers, actualEmployers + actualUsers);
        }