public static Identity ToModel(this Facade.Identity from) { if (from.IsEmpty) { return(Identity.Empty); } return(new Identity((string)from)); }
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())); }