Example #1
0
        public static DataServiceQuerySingle <T> GetSingleEntityByKey <T>(this DataServiceQuery <T> source, IDictionary <string, object> alternateKeys)
        {
            var keys = string.Join(',', alternateKeys.Select(kv => $"{kv.Key}={ODataUriUtils.ConvertToUriLiteral(kv.Value, ODataVersion.V4)}"));

            return(new DataServiceQuerySingle <T>(source.Context, source.GetKeyPath(keys)));
        }