*348In an action to recover damages for legal malpractice, the plaintiff appeals from a judgment of the Supreme Court, Nassau County (Galasso, J.), entered June 9, 2003, which, upon an order of the same court dated May 22, 2003, granting the motion of the defendant Gandin, Schotsky, Rappaport, Glass & Greene, LLf] for summary judgment dismissing the complaint insofar as asserted against it, and, in effect, searching the record and granting summary judgment dismissing the complaint insofar as asserted against the defendant Mark G. Sokoloff, dismissed the complaint.
Ordered that the judgment is affirmed, with costs.
The plaintiff commenced this action to recover damages for legal malpractice alleging, inter alia, that the defendants were negligent in their representation of him in an underlying action against the Long Island Rail Road Company (hereinafter the LIRR) in the United States District Court for the Eastern District of New York (hereinafter the federal action), alleging a violation of the Federal Rehabilitation Act of 1973 § 504 (29 USC § 794 et seq.)
In any legal malpractice action, a plaintiff has the burden of demonstrating that, but for the attorney’s negligent representation, he or she would have prevailed in the underlying action (see Laventure v Galeno, 307 AD2d 255 [2003]). By demonstrating that the plaintiff could not recover in the underlying federal action against the LIRR, the defendant Gandin, Schotsky, Rappaport, Glass & Greene, LLP (hereinafter GSRG & G), demonstrated its initial entitlement to judgment as a matter of law (see Dynamics Corp. of Am. v Marine Midland Bank-N.Y., 69 NY2d 191, 197 [1987]; Hay v First Interstate Bank of Kalispell, N.A., 978 F2d 555 [1992]). In opposition, the plaintiff failed to raise a triable issue of fact regarding his ability to recover in the underlying federal action. Therefore, the Supreme Court properly granted summary judgment dismissing the complaint insofar as asserted against GSRG & G, and, in effect, searched the record and granted summary judgment dismissing the complaint insofar as asserted against the defendant Mark G. Sokoloff (see CPLR 3212 [b]), one of the attorneys representing the plaintiff in the underlying federal action.
The plaintiffs remaining contention is without merit. Smith, J.P., Krausman, Crane and Mastro, JJ., concur.