Beispiel #1
0
        // we override the implementation of LinqBaseRepository because this is built in
        protected override T GetQuery(TKey key, IFetchStrategy <T> fetchStrategy)
        {
            var item = Client.GetDocument(key.ToString());

            if (item == null)
            {
                return(null);
            }

            // this always returns an object, so check to see if the PK is null, if so then return null
            GetPrimaryKey(item, out TKey id);

            return(id == null ? null : item);
        }
        // we override the implementation of LinqBaseRepository because this is built in
        protected override T GetQuery(string key)
        {
            var item = Client.GetDocument(key);

            if (item == null)
            {
                return(null);
            }

            // this always returns an object, so check to see if the PK is null, if so then return null
            string id;

            GetPrimaryKey(item, out id);

            return(id == null ? null : item);
        }