public SimpleResponse <bool> Any(ShipperDeleteRequest request) { if (Validator != null) { Validator.ValidateAndThrow(new Shipper { ShipperId = request.ShipperId }, ApplyTo.Delete); } OnBeforeShipperDeleteRequest(request); var output = Repository.Delete(request); OnAfterShipperDeleteRequest(request, output); if (!output.Result) { throw new HttpError(HttpStatusCode.NotFound, "NullReferenceException", "Shipper matching [ShipperId = {0}] does not exist".Fmt(request.ShipperId)); } return(output); }
partial void OnAfterShipperDeleteRequest(ShipperDeleteRequest request, SimpleResponse <bool> deleted);
partial void OnBeforeShipperDeleteRequest(ShipperDeleteRequest request);