public static ApiModel <TValue> AsApiModel <TValue>(this IdentityResult identityResult, TValue val) where TValue : class { return(new ApiModel <TValue>(val, identityResult.AsApiResult())); }