Exemplo n.º 1
0
        public ActionResult DeleteStylist(int id)
        {
            Stylist selectStylist = Stylist.Find(id);

            selectStylist.Delete();
            selectStylist.DeleteFromJoin();

            return(View());
        }
Exemplo n.º 2
0
        public void Delete_DeleteFromStylists_clients_byClientId()
        {
            Stylist testStylist1 = new Stylist("testName");

            testStylist1.Save();
            Client testClient1 = new Client("test1");

            testClient1.Save();
            Stylist.AddNewClient(testStylist1.GetId(), testClient1.GetId());

            testStylist1.DeleteFromJoin();

            List <Stylist> testStylist = Client.GetStylistByClient(testClient1.GetId());

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