实体框架DbSet包含0条记录(Entity Framework DbSet contains 0 records)
所以我有以下问题:
我有一些与DB中的表对应的Vehicle实体。 但是当我尝试使用以下行检索所有记录时:
var vehicles = db.VehicleSet.ToList();
我得到了ZERO对象......而DB中的表格大约有。 18k记录。
知道问题可能在哪里,或者问题是否过于模糊?
So I have the following problem:
I have some Vehicle entity that corresponds to a table in the DB. But when I try to retrieve ALL the records with the following line :
var vehicles = db.VehicleSet.ToList();
I get ZERO objects as result ... whilst the table in the DB has approx. 18k records.
Any idea where the problem might be, or is the question too vague?
原文:https://stackoverflow.com/questions/21258462
最满意答案
构建Webview是为了呈现没有大小的 HTML页面。 所以没有办法确定不存在的东西并按照它重新调整大小,就像在src图像发生变化时ImageView调整大小一样。
您最好的选择是将webview的大小设置为固定值, 可能是重量 ,当页面大于webview本身时,用户必须在其中滚动。
Webview is built to render HTML pages which doesn't have size. so there is no way for it to determine something that doesn't exist and re-size according to it the same way say an ImageView resizes when the src image has changed.
Your best choice is to set the size of the webview to a fixed value maybe with weight and the user will have to scroll inside it when the page is bigger than the webview itself.
相关问答
更多-
双击时如何停止android webview内容重排?(How to stop android webview content reflow when double tapped?)[2023-01-24]
我终于通过这条线解决了这个问题。 webView.getSettings().setLayoutAlgorithm(WebSettings.LayoutAlgorithm.NORMAL); 默认情况下, WebSettings.LayoutAlgorithm为NARROW_COLUMNS 。 通过研究android.webkit.ZoomManager类,如果NARROW_COLUMNS和else情况在必要时重新进行,它必须重排(重新排列)。 我不知道“必要”是什么,但至少在我的情况下它不会再回流。 有一 ... -
这可能是服务器缓存策略的问题,与WebView无关。 顺便说一句,你确定它们是重新加载的,还是只是轮询更改而不是实际重新获取? 尝试使用PC上的Chrome进行调试。 It's probably a matter of the server cache policy and has nothing to do with the WebView. BTW, Are you sure they are re-loaded, or just polled for changes and not actually ...
-
对话窗口不包含内容(Dialog window is not wraping content)[2022-04-21]
尝试这个:UWP Webview内容可编辑(UWP Webview Content Editable)[2022-02-28]
有一个本体html文件,它具有作为contenteditable div的body和使用WebView.NavigateToLocalStreamUri方法(这里是示例) ,导航到这个页面。然后用你的字符串设置div的内容。 另请参阅WebView.InvokeScriptAsync和ScriptNotify以从webview注入和检索数据。 Have a local html file which has body as contenteditable div and using WebView.Navi ...WebView没有包装内容(WebView not wraping content)[2023-07-08]
构建Webview是为了呈现没有大小的 HTML页面。 所以没有办法确定不存在的东西并按照它重新调整大小,就像在src图像发生变化时ImageView调整大小一样。 您最好的选择是将webview的大小设置为固定值, 可能是重量 ,当页面大于webview本身时,用户必须在其中滚动。 Webview is built to render HTML pages which doesn't have size. so there is no way for it to determine something t ...有没有办法获得WebView的当前内容? 不,对不起。 关于特定主机+网址的Cookies怎么办? 请参阅CookieManager 。 Is there a way to get the current content of a WebView? No, sorry. What about Cookies for a specific host+url? See CookieManager.如果您希望所有视图都在单个滚动条中滚动,那么有一个非常有用的库 - commonsguy / cwac-merge 使用下面提供的代码需要满足一个条件。 请记住,这种针对您的问题的方法可能会有所不同,但最终结果正是您所需要的。 条件: 此库只能与ListView一起使用。 多数民众赞成,让我们开始。 将您的活动布局设为:在Webview中缩放html内容(Scale html content in Webview)[2023-12-11]
如果它足以让你只缩放文本,那么使用方法-[WebView makeTextSmaller:]和-[WebView makeTextLarger:]并重置文本大小-[WebView makeTextStandardSize:]如WebView 。 这些方法对应于Safari中的“Cmd - ”和“Cmd +”和“Cmd 0”。 如果要扩展包含图像的WebView的整个内容,请使用以下方法: - (void) zoomWebView:(WebView *)aWebView withFactor:(float)f ...用户按下片段A中的按钮后,我会立即切换到片段B. 片段B将包含您的webview,以及与webview重叠以隐藏它的内容。 它可以是任何东西,甚至是简单的图像,也可以是加载动画。 在onPageFinished()中,您应该调用WebView.pageDown(true),并隐藏重叠层以显示webview。 Okay, I figured it out myself. The answer is simple. I'm placing FragmentA and FragmentB inside Frame ...嗯,它表明问题在其他地方。 偶然我在stackoverflow上发现了一些关于javascript的问题并且有评论,在javascript函数体中不能以//开头的评论。 当webview读取此内容时,请停止加载其他所有内容。 在我的函数中有几个这样的注释,所以在删除它们之后调用函数工作。 Well, it shows that problem is somewhere else. By accident i discovered some question about javascript here on ...相关文章
更多- IOS-Social.framework
- [Yii Framework] 使用Yii Framework开发微信公众平台
- AMF: ASP.NET Mobile Framework
- 安卓应用程序插件化开发框架 -AAP Framework
- 安卓应用程序插件化开发框架 -AAP Framework
- 《DotNetNuke 4 高级编程》(Professional DotNetNuke 4: Open Source Web Application Framework for ASP.NET 2.0)扫描版[PDF]
- Using Lucene's new QueryParser framework in Solr
- 【z】Storm - the world's best IDE framework for .NET
- Windows Moible, Wince 使用.NET Compact Framework的进行蓝牙(Bluetooth)开发 之 蓝牙虚拟串口 (Bluetooth Virtual Serial Port)
- spring jdbctemplate batch 可以处理多少条记录
最新问答
更多- 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
- 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
- OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
- 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
- codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
- 在计算机拍照在哪里进入
- 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
- No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
- 单页应用程序:页面重新加载(Single Page Application: page reload)
- 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
- System.StackOverflow错误(System.StackOverflow error)
- KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
- 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
- android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
- TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
- 企业安全培训的各项内容
- 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
- C#类名中允许哪些字符?(What characters are allowed in C# class name?)
- NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
- 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
- 将多个行和可变行移动到列(moving multiple and variable rows to columns)
- 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
- 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
- Angular $资源不会改变方法(Angular $resource doesn't change method)
- 在Angular 5中不是一个函数(is not a function in Angular 5)
- 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
- 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
- 常见的python rpc和cli接口(Common python rpc and cli interface)
- Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
- 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)