Refactored success and failure blocks inside query method of AppDotNetService