xx类= DbContext.类.Where(x => x.StatusId == 1).Take(20).Select(v => v.Url, v.StatusId ).ToList(); //这样写会提示类型转换错误不能用匿名类
xx类= DbContext.类.Where(x => x.StatusId == 1).Take(20).Select(v => new xx类 { Id = v.Id, Url = v.Url, StatusId = v.StatusId }).ToList();