예제 #1
0
 public ActionResult <Employee> GetEmployee(string email) => email
 .Apply(C5.createEmailAddress).Apply(fs)
 .Map(email =>
      fs(C5.getEmployeeByEmail(_db, email))
      .Map(e => (ActionResult <Employee>)Ok(e))
      .IfNone(() => NotFound()))
 .IfNone(() =>
         BadRequest("Invalid email address"));