예제 #1
0
        public static Identity ToModel(this Facade.Identity from)
        {
            if (from.IsEmpty)
            {
                return(Identity.Empty);
            }

            return(new Identity((string)from));
        }
예제 #2
0
        public HttpResponseMessage <Facade.Topic[]> GetByGroup(Facade.Identity groupId, int skip, int limit)
        {
            // set valid values of opional parameters
            var validatedSkip  = skip > 0 ? skip : new int?();
            var validatedLimit = limit > 0 ? limit : new int?();

            return(ProcessGet(() =>
                              topicsByGroup.GetTopics(groupId.ToModel(), validatedSkip, validatedLimit)
                              .Select(item => item.ToFacade())
                              .ToArray()));
        }