zoukankan      html  css  js  c++  java
  • EF链表查询

     public ActionResult GetCourseList()
            {
                var mo = from e in gzhContext.WxCourseList.Select(m=>new { m.Id,m.Title,m.CourseName,m.Coursetype,m.StartTime, m.LiveNumber, m.Imgid,m.Status})
                         from f in gzhContext.CourseCover.Select(m=>new { m.ImgId,m.Img,m.Ext})
                         where e.Imgid == f.ImgId && e.StartTime >= DateTime.Now.AddDays(-1)
                         orderby e.Coursetype descending
                         select new
                         {
                             Id = e.Id,
                             Title = e.Title,
                             CourseName = e.CourseName,
                             Coursetype = e.Coursetype,
                             StartTime = Convert.ToDateTime(e.StartTime).ToString("yyyy-MM-dd HH:mm"),
                             LiveNumber = e.LiveNumber,
                             Imgid = e.Imgid,
                             Status = e.Status,
                             Img = f.Img,
                             Ext = f.Ext
                         };
                mo.ToList();
                return new JsonResult(0, mo);
            }

  • 相关阅读:
    vue中处理ie兼容性问题
    vue使用websocket
    vue-cli中使用sass的坑
    really_probe()
    ro.boot.bootreason property设置(androidboot.xxxx bootargs)
    kernel exception vector table
    compile/link misc
    user space syscall/library API misc
    LIUNX SHELL中-a 到-z的解释
    getenforce/setenforce
  • 原文地址:https://www.cnblogs.com/aghk/p/12867525.html
Copyright © 2011-2022 走看看