Exemplo n.º 1
0
        public IHttpActionResult Delete(int id)
        {
            var node = _ar.GetNode(id);

            if (node == null)
            {
                return(NotFound());
            }
            else
            {
                _ar.Delete(node);
                return(Ok());
            }
        }
Exemplo n.º 2
0
        public void DeletingAgencyAndDepedencies()
        {
            Response aResponse = new Response();

            agencyRepo.Insert(AGENCY1);

            AgencyAgent agencyAgent = AgencyAgentTesting.AGENCYAGENT1;

            agencyAgent.Agency = AGENCY1;
            agencyagentRepo.Insert(agencyAgent);

            Mission mission = MissionTesting.MISSION1;

            mission.Agency = AGENCY1;
            missionRepo.Insert(mission);

            aResponse = agencyRepo.Delete(1);

            Assert.IsTrue(aResponse.Success);
        }