Esempio n. 1
0
        public ActionResult DeleteSpecialtyFinal(int id)
        {
            Specialty selectedSpecialty = Specialty.Find(id);

            selectedSpecialty.Delete();
            selectedSpecialty.DeleteFromJoin();

            return(View());
        }
Esempio n. 2
0
        public ActionResult DeleteSpecialty(int id)
        {
            Specialty      selectedSpecialty = Specialty.Find(id);
            List <Stylist> foundStylist      = Specialty.GetStylistBySpecialty(id);

            selectedSpecialty.DeleteFromJoin();

            return(View(foundStylist));
        }
Esempio n. 3
0
        public void Delete_DeleteFromStylists_specialty()
        {
            Stylist testStylist1 = new Stylist("testName");

            testStylist1.Save();
            Specialty testSpecialty1 = new Specialty("test1");

            testSpecialty1.Save();
            Specialty.AddNewSpecialtyJoinStylist(testStylist1.GetId(), testSpecialty1.GetSpecialtyId());
            testSpecialty1.DeleteFromJoin();

            List <Stylist> testSpecialty = Specialty.GetStylistBySpecialty(testSpecialty1.GetSpecialtyId());

            Assert.AreEqual(0, testSpecialty.Count);
        }