diff --git a/Storage/Storage/LCQuery.cs b/Storage/Storage/LCQuery.cs index 799b354..928bc1e 100644 --- a/Storage/Storage/LCQuery.cs +++ b/Storage/Storage/LCQuery.cs @@ -346,20 +346,12 @@ namespace LeanCloud.Storage { return (int)ret["count"]; } - public async Task Get(string objectId) { + public Task Get(string objectId) { if (string.IsNullOrEmpty(objectId)) { throw new ArgumentNullException(nameof(objectId)); } WhereEqualTo("objectId", objectId); - Limit(1); - ReadOnlyCollection results = await Find(); - if (results != null) { - if (results.Count == 0) { - return null; - } - return results[0]; - } - return null; + return First(); } public async Task> Find() {