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

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

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

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

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

            _repo.Delete(id);
            return("DELETED");
        }
Exemplo 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");
        }
Exemplo 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");
        }
Exemplo 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");
 }
Exemplo 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");
 }