EDMX实体不填充数据

时间:2015-04-30 05:48:51

标签: entity-framework entity-framework-6 asp.net-web-api2 poco edmx

我正在开发一个使用Entity Framework的项目。

我遇到了一个非常奇怪的问题 我通过EDMX获取User表信息,该信息与Contacts表(通过UserID列)有关。

现在,User集合已检索ContactID,并且还应检索所有Contact的{​​{1}}信息,而Users实体则填充Contact个实体。 User和其他人NULLContactID。但是,如果我检查Contact中的值是否可用,但某些用户NULL实体为<!DOCTYPE html> <html> <head> <title>Geolocation</title> <meta name="viewport" content="initial-scale=1.0, user-scalable=no"> <meta charset="utf-8"> <style> html, body, #map-canvas { height: 100%; margin: 0px; padding: 0px } </style> <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&signed_in=true"></script> <script> // Note: This example requires that you consent to location sharing when // prompted by your browser. If you see a blank space instead of the map, this // is probably because you have denied permission for location sharing. var map; function initialize() { var mapOptions = { zoom: 6 }; map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); // Try HTML5 geolocation if(navigator.geolocation) { navigator.geolocation.getCurrentPosition(function(position) { var pos = new google.maps.LatLng(position.coords.latitude, position.coords.longitude); var infowindow = new google.maps.InfoWindow({ map: map, position: pos, content: 'Location found using HTML5.' }); map.setCenter(pos); }, function() { handleNoGeolocation(true); }); } else { // Browser doesn't support Geolocation handleNoGeolocation(false); } } function handleNoGeolocation(errorFlag) { if (errorFlag) { var content = 'Error: The Geolocation service failed.'; } else { var content = 'Error: Your browser doesn\'t support geolocation.'; } var options = { map: map, position: new google.maps.LatLng(60, 105), content: content }; var infowindow = new google.maps.InfoWindow(options); map.setCenter(options.position); } google.maps.event.addDomListener(window, 'load', initialize); </script> </head> <body> <div id="map-canvas"></div> </body> </html> 。我从未遇到过这种问题。任何建议都应高度适用......

0 个答案:

没有答案