public object Get(GetProgram request) { var user = string.IsNullOrEmpty(request.UserId) ? null : _userManager.GetUserById(new Guid(request.UserId)); var result = _liveTvManager.GetProgram(request.Id, CancellationToken.None, user).Result; return(ToOptimizedSerializedResultUsingCache(result)); }
public async Task <object> Get(GetProgram request) { var user = string.IsNullOrEmpty(request.UserId) ? null : _userManager.GetUserById(request.UserId); var result = await _liveTvManager.GetProgram(request.Id, CancellationToken.None, user).ConfigureAwait(false); return(ToOptimizedSerializedResultUsingCache(result)); }