コード例 #1
0
        public ApiResponse DeleteById(long id)
        {
            VehicleStatusProcessor = new VehicleStatusProcessor();
            Response = new ApiResponse();

            try
            {
                VehicleStatusProcessor.Delete(id);
                Response.text   = "Entity was successfully removed from the system.";
                Response.result = true;

                return(Response);
            }
            catch
            {
                Response.text   = "Unfortunately something went wrong :(";
                Response.result = false;

                return(Response);
            }
        }
コード例 #2
0
        public ApiResponse Delete(List <long> idList)
        {
            VehicleStatusProcessor = new VehicleStatusProcessor();
            Response = new ApiResponse();

            try
            {
                VehicleStatusProcessor.Delete(idList);
                Response.text   = "Entity was successfully removed from the system.";
                Response.result = true;

                return(Response);
            }
            catch
            {
                Response.text   = "Unfortunately something went wrong. Try again later. :)";
                Response.result = false;

                return(Response);
            }
        }