Example #1
0
 public Branch GetBranchByName(string name, int parentId = 0, int?revision = null)
 {
     using (var context = new ApiDocDbDataContext())
     {
         return(DbTypeConverter.MapBranch(context.Nodes_GetByName(parentId, name, revision).First()));
     }
 }
Example #2
0
 public IList <Leaf> GetLeafes(int parentId, bool showDeleted = false)
 {
     using (var context = new ApiDocDbDataContext())
     {
         return(context.Leafes_GetAll(parentId, showDeleted)
                .Select(x => DbTypeConverter.MapLeaf(x, GetHttpVerbs())).ToList());
     }
 }
Example #3
0
 public IList <Leaf> GetLeafRevisions(int parentId, string name, int?httpVerb)
 {
     using (var context = new ApiDocDbDataContext())
     {
         return(context.Leafes_GetRevisions(parentId, name, httpVerb)
                .Select(x => DbTypeConverter.MapLeaf(x, GetHttpVerbs())).ToList());
     }
 }
Example #4
0
 public Leaf GetLeafByName(int parentId, string name, int?httpVerb, int?revision = null)
 {
     using (var context = new ApiDocDbDataContext())
     {
         return(DbTypeConverter.MapLeaf(
                    context.Leafes_GetByName(parentId, name, httpVerb, revision).First(),
                    GetHttpVerbs()));
     }
 }