public static IRegistration Register <A, R>(this IRegistration registration, Func <A, R> source) { var targetType = typeof(Func <A, R>); var curried = Functional.Curry(source); registration.Add(targetType, () => curried); return(registration); }
public IHttpActionResult Post(registration model) { if (ModelState.IsValid) { return(Ok(registrationRepository.Add(model))); } else { return(BadRequest()); } }