Join Robby Millsap for an in-depth discussion in this video Diagram a fluent API, part of Fluent API Development in C#.
- [Instructor] Now it's time to create…the fluent version of this API.…If you remember our problem statement, we need to…enroll unregistered students into an orientation class.…When I build a fluent API, the first thing I do…is pseudo code out what I would like it to look like.…I don't worry about how feasible it is,…I just think in an ideal world, how would this look?…So let's create something called a new fluent enroller,…and we're going to have a path called enroll.…When enroll is done, we're gonna call save.…Now, I wanna create some context for what I'm enrolling,…so I'm gonna say with students and given a list of students,…I am going to filter this list down…where the students are not registered,…and I'm gonna use a callback to do this.…
Is registered, now it's registered,…and for course orientation.…This is what I would like my fluent API to look like,…now I have to figure out how to implement it…so that this code actually compiles and works as I expect.…
- Why fluent?
- Creating paths
- Fluent techniques
- Examples of fluent APIs
- Refactoring to fluent