
402 So.2d 58 (1981)
William BROWN, Appellant,
v.
SOUTH BROWARD HOSPITAL DISTRICT, d/b/a Memorial Hospital, a Political Subdivision of the State of Florida, Appellee.
No. 79-654.
District Court of Appeal of Florida, Fourth District.
August 12, 1981.
*59 Jeffrey Michael Cohen and David A. Rosenblatt of Fromberg, Fromberg & Roth, Miami, for appellant.
Steven R. Berger of Carey, Dwyer, Cole, Selwood & Bernard, P.A., Miami, for appellee.
HERSEY, Judge.
William Brown appeals from a final order granting a motion to dismiss his amended complaint with prejudice.
Appellee, South Broward Hospital District, entered into a contract with Andrew H. Warner, Inc. whereby the latter became general contractor to remodel Memorial Hospital, owned by the District. The general contractor entered into a contract with Chief Salvage Corporation which thus became a subcontractor to perform certain phases of the work. Appellant, Brown, was an employee of the subcontractor. On November 9, 1976, he was instructed by his foreman to reduce the width of a ledge on the second floor of the building. It is alleged in the complaint and admitted for purposes of the motion to dismiss and this appellate review that Brown specifically requested safety straps or a scaffold "but none were available or, in the alternative, the Plaintiff's foreman refused to provide the Plaintiff with them." It is further alleged that during the cutting operation a piece of concrete fell, throwing the concrete saw into the air, causing Brown to fall whereby he sustained serious injuries.
The amended complaint containing these allegations was dismissed for failure to state a cause of action. Appeal is taken only with reference to the dismissal of Count II and our review will be similarly limited.
The issue raised by the briefs and the record is whether the owner of real property is liable to the employee of a contractor engaged by the owner to build, remodel or demolish a building for injuries sustained by that employee during the course of and within the scope of his employment. While the issue thus stated is rather too broad, the subsequent discussion will serve to narrow the legal issue we actually determine here.
Appellant attacks the trial court's order as erroneous, advancing two alternative theories.
First, appellant suggests that the trial court may have determined that worker's compensation insurance was the exclusive remedy available under these circumstances. If this were the sole basis for the trial court's order, then it would be clearly erroneous, as suggested by appellant. It is correct to state that Section 440.11, Florida Statutes (1979) provides that the liability of an employer for worker's compensation is in lieu of any other liability to the employee and therefore is his exclusive remedy. The test for application of the immunity rule is whether the party against whom relief is sought had the duty or liability to provide worker's compensation coverage. Immunity is co-extensive with that duty. Smith v. Ussery, 261 So.2d 164 (Fla. 1972). Appellee hospital district was neither an "employer" nor a "contractor" within the meaning of the Worker's Compensation Act; therefore is not immune from suit. Jones v. Florida Power Corp., 72 So.2d 285 (Fla. 1954). The issue of immunity, however, becomes operable only if the complaint does or could otherwise state a cause of action against appellee.
*60 Appellant's argument on this question is more complex and troublesome. In summary, Brown contends that failure to provide scaffolding was a violation of a penal statute, which statute imposed a duty on the owner of the premises, so that the violation itself is negligence per se, actionable against the owner/appellee. On that basis, appellant's injuries having been proximately caused by the violation, the complaint would state a cause of action against appellee.
The statute in question is the South Florida Building Code made applicable in Broward County by Chapter 71-575, Special Laws of the State of Florida. The portions relied upon, as originally set out in the complaint and appellant's brief, are:
§ 304.2 COMPLIANCE (d): "Compliance with this Code is the responsibility of the owner."
§ 3316 SCAFFOLDS: "Properly constructed scaffolds shall be provided for all work which cannot be done safely by workmen standing on permanent or solid construction, except when such work can be done safely from ladders."
It is argued by appellant that Section 3316 is designed to protect a certain class of persons (workers) from a particular type of injury (falling) so that violation of that section constitutes negligence per se.
In deJesus v. Seaboard Coast Line Railroad Company, 281 So.2d 198 (Fla. 1973) the Supreme Court distinguished three types of statutes, violation of which has relevance to the burden of proof in a negligence action. Violation of a statute designed to protect a particular class of persons from their inability to protect themselves, such as one prohibiting the sale of firearms to minors, is "strict liability" negligence per se to which contributory negligence is no defense. A violation of any other statute which establishes a duty to take precautions to protect a particular class of persons from a particular injury or type of injury also constitutes negligence per se; however, contributory negligence is a bar to recovery in this category. Violation of any other type of statute may be considered as prima facie evidence of negligence. Schulte v. Gold, 360 So.2d 428 (Fla. 3d DCA 1978).
The building code falls into the second category and if the statute places the duty of providing scaffolding on the owner, then appellant's complaint, alleging violation of the statute which constitutes negligence per se, alleges a cause of action and should not have been dismissed with prejudice. The crucial question is whether appellee-owner owed a duty to appellant-employee under the circumstances alleged.
Appellee had no common law duty to provide Brown with a safe place to work. Cuyahoga Wrecking Corp. v. Mastres, 368 So.2d 380 (Fla. 3d DCA 1979). Moreover, where the very work the employee is engaged to do creates the hazard whereby he is injured, the employee "assumes the risk by accepting the employment." Jacques v. Miami Ice & Cold Storage Co., 73 Fla. 1193, 75 So. 788 (1917). The Cuyahoga court also had under consideration a violation of the building code causing an injury to a workman who sued the owner. That court decided that the plaintiff-workman was outside that class of persons afforded any protection by the section. The rationale for this holding was said to be that one performing the duties for which he was hired is not within the class designed to be protected by the building code.
An amendment to the ordinance causes Section 304.2(d) to now read:
(d) Compliance with the Code is the responsibility of the owner, except that safety to persons and materials during actual construction operations, as set forth in Chapter 33, is the responsibility of the permit holder.
It is unclear whether the amendment became effective on December 1, 1974 or on March 13, 1975. The trial court decided the case on the assumption that the original language of the ordinance applied. We need not determine whether the amendment should have been considered. We hold that the building code did not and does not now impose a duty on the landowner to supervise construction undertaken by an independent *61 contractor and subcontractors. On the facts of the present case appellant therefore has no recourse against appellee and the complaint was appropriately dismissed.
AFFIRMED.
LETTS, C.J., and GLICKSTEIN, J., concur.
