当前位置: 首页>>代码示例>>C#>>正文


C# NancyContext.ApplyODataUriFilter方法代码示例

本文整理汇总了C#中Nancy.NancyContext.ApplyODataUriFilter方法的典型用法代码示例。如果您正苦于以下问题:C# NancyContext.ApplyODataUriFilter方法的具体用法?C# NancyContext.ApplyODataUriFilter怎么用?C# NancyContext.ApplyODataUriFilter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Nancy.NancyContext的用法示例。


在下文中一共展示了NancyContext.ApplyODataUriFilter方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetSeries

        /*
         * 
         */ 
        public static IEnumerable<Comic> GetSeries(BCRUser user, Guid id, NancyContext context)
        {
            var books = ComicRackWebViewer.Plugin.Application.GetLibraryBooks();
            var book = books.Where(x => x.Id == id).First();
            var series = books.Where(x => x.ShadowSeries == book.ShadowSeries)
                .Where(x => x.ShadowVolume == book.ShadowVolume)
                .Select(x => x.ToComic(user))
                .OrderBy(x => x.ShadowNumber).ToList();

            int totalCount = 0;
            return context.ApplyODataUriFilter(series, ref totalCount).Cast<Comic>();
        }
开发者ID:jeroenwalter,项目名称:ComicRackWeb,代码行数:15,代码来源:BCRAPI.cs

示例2: GetSeries

 public static List GetSeries(Guid id, NancyContext context)
 {
     var books = Plugin.Application.GetLibraryBooks();
     var book = books.Where(x => x.Id == id).First();
     var series = books.Where(x => x.Series == book.Series)
         .Where(x => x.Volume == book.Volume)
         .Select(x => x.ToComic())
         .OrderBy(x => x.Number).ToList();
     return new List
     {
         Comics = context.ApplyODataUriFilter(series).Cast<Comic>(),
         Name = book.Series
     };
 }
开发者ID:kavenblog,项目名称:ComicRackWeb,代码行数:14,代码来源:API.cs

示例3: GetIssuesOfList

 public static List GetIssuesOfList(string name, NancyContext context)
 {
     var list = GetLists(Program.Database.ComicLists).FirstOrDefault(x => x.Name == name);
     if (list == null)
     {
         return new List
         {
             Comics = Enumerable.Empty<Comic>(),
             Name = name
         };
     }
     return new List
     {
         Comics = context.ApplyODataUriFilter(list.GetBooks().Select(x => x.ToComic())).Cast<Comic>(),
         Name = name
     };
 }
开发者ID:kavenblog,项目名称:ComicRackWeb,代码行数:17,代码来源:API.cs


注:本文中的Nancy.NancyContext.ApplyODataUriFilter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。