示例#1
0
        public Stream ReadQuery(string domainObject, string uri)
        {
            var type = DomainModel.Find(domainObject);

            if (type != null && typeof(IAggregateRoot).IsAssignableFrom(type))
            {
                return(CachingService.ReadFromCache(type, uri, Locator));
            }
            return(CrudComands.ReadQuery(domainObject, uri));
        }
示例#2
0
        public Stream FindQuery(string domainObject, string uris, string order)
        {
            var type = DomainModel.Find(domainObject);

            if (type != null && typeof(IAggregateRoot).IsAssignableFrom(type))
            {
                return(CachingService.ReadFromCache(type, (uris ?? string.Empty).Split(','), order == "match", Locator));
            }
            return(DomainCommands.FindQuery(domainObject, uris, order));
        }
示例#3
0
        public Stream FindFrom(string domainObject, string order, Stream body)
        {
            var type = DomainModel.Find(domainObject);

            if (type != null && typeof(IAggregateRoot).IsAssignableFrom(type))
            {
                var uris = Serialization.Deserialize <string[]>(body, ThreadContext.Request.ContentType);
                return(CachingService.ReadFromCache(type, uris, order == "match", Locator));
            }
            return(DomainCommands.FindFrom(domainObject, order, body));
        }