How to turn any api to a fluent API with extension methods in C#

Updated: Jun 18, 2018



Let’s say you have a class A, which exposes an old fashion, not fluent api



In languages like Java, you would be stack with using this class in the old, and a very verbose way:




So the cumbersome code from before looks like:



That’s it.

#FluentAPI #Extensionmethods

361 views
  • Black Twitter Icon
  • Black YouTube Icon

At Wix Engineering we develop some of the most innovative cloud-based web applications that influence our +180 million users worldwide.

Have any questions?
Email: wixeng@wix.com

Trademarks and logos of other parties appearing in this post are the property of their respective holders.

Get Wix Engineering Straight to Your e-mail