我正在制作一个电影评论网站(没有实体框架)(不打算使用它)
以下代码:我是如何根据下面的查询获取电影信息的
<div class="panel panel-default" style="background-color:white;">
<div class="panel-body">
<div style="height:400px; width:100%;">
<section class="center slider" style="width: 88%;">
@*Aqui va el poster de reviews recientes*@
@foreach (var poster in Model.LGetLastReviews)
{
<div>
<a href="/Review/Review/?=@poster.Id" id="tag<%=count++%" name="@poster.Id">
<img class="sizecool hvr-shrink" src="@Href("~/Content/"+@poster.Path )"/>
</a>
<div class="subtitulo">
@poster.Title
@poster.Date
</div>
</div>
}
</section>
</div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
这是查询:
CREATE PROCEDURE [dbo].[GetLastReviews] @Top bigint
AS
BEGIN
SELECT TOP(@Top) Movie.Id, MOVIE.title, Poster.path_image, review.comment, review.Date from review
inner join movie on review.Movie_Id = movie.Id
inner join poster on …Run Code Online (Sandbox Code Playgroud)