internal string Delete(int id)
        {
            var data = Get(id);

            _repo.Delete(id);
            return("Deleted Contractor");
        }
        public bool Delete(int id)
        {
            var data = FindById(id);

            _repo.Delete(id);
            return(true);
        }
Esempio n. 3
0
        internal string Delete(int id)
        {
            var data = GetById(id);

            _repo.Delete(id);
            return("Bye Bye Contractor");
        }
        //DELORT
        internal Contractor Delete(string id)
        {
            Contractor original = GetById(id);

            _repo.Delete(id);
            return(original);;
        }
Esempio n. 5
0
        internal string Delete(int id)
        {
            var data = GetById(id);

            _repo.Delete(id);
            return("DELETED");
        }
Esempio n. 6
0
        internal String Delete(int id)
        {
            // NOTE: Why do we declare data? We don't use it...
            Contractor data = GetById(id);

            _repo.Delete(id);
            return("delorted");
        }
Esempio n. 7
0
        internal string Delete(int id, string userId)
        {
            var original = GetById(id);

            if (original.CreatorId != userId)
            {
                throw new Exception("Invalid Delete Permissions");
            }
            _repo.Delete(id);
            return("nice delete");
        }
        internal String Delete(int id, string userId)
        {
            var data = GetById(id);

            if (data.CreatorId != userId)
            {
                throw new Exception("Invalid Creator you do not have permissions");
            }
            _repo.Delete(id);
            return("Successfully Deleted");
        }
Esempio n. 9
0
        internal string Delete(int id)
        {
            var original = GetById(id);

            if (original == null)
            {
                throw new Exception("Invalid Delete Permissions");
            }
            _repo.Delete(id);
            return("DELETED");
        }
 public ActionResult <string> Delete(int id)
 {
     try
     {
         return(Ok(_Repo.Delete(id)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
 internal string Delete(int id)
 {
     GetById(id);
     _contractorsRepository.Delete(id);
     return("Successfully Deleted");
 }
 internal string Delete(int id)
 {
     GetById(id);
     _repo.Delete(id);
     return("Successfully Deleted");
 }
 public string Delete(int id)
 {
     _repo.Delete(id);
     return("Successfully Deleted");
 }
Esempio n. 14
0
 internal string Delete(int id, string userId)
 {
     GetById(id);
     _crepo.Delete(id, userId);
     return("Contractor Deleted");
 }
 internal string Delete(int id)
 {
     Get(id);
     _repo.Delete(id);
     return("deleted");
 }