我在linq中进行了一个查询,加入了2个类,问题是我现在要在视图中显示它,因为查询在控制器中这里是查询:
public ActionResult JoinSupToPro()
{
SupplierDBContext dbS = new SupplierDBContext();
var innerJoinQuery = from pro in db.Products join sup in dbS.Suppliers on pro.SupplierId equals sup.ID
select new { pro.Name,pro.Price, NameSup= sup.Name , sup.Phone,};
return View();
}
Run Code Online (Sandbox Code Playgroud)
我如何在视图中显示它们?
我有一个视频视图,播放某个视频,这是他的xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal" android:layout_width="match_parent"
android:layout_height="match_parent">
Some other views
<VideoView
android:id = "@+id/video"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_gravity="center"
android:layout_alignParentStart="true"
/>
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)
我正在尝试将视频居中放置,但是无论何时我播放视频,它都不会出现在中心位置,并且位置会有所不同,具体取决于视频,如何将其居中?