Last active
February 2, 2017 12:49
-
-
Save Renancp01/c065313e32aabce28f4b10f41a309396 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ApplicationDbContext db = new ApplicationDbContext(); | |
public ActionResult Index() | |
{ | |
var lista = db.Publicacao.ToList(); | |
return View(lista); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@foreach (var item in Model) | |
{ | |
<section class="container"> | |
<article class="row"> | |
<div class="col-md-4"> | |
<div class="thumbnail"> | |
<h3 style="padding-left:17px;padding:0; background-color:orangered; margin:0; text-align:center;color:white;">@Html.DisplayFor(model => item.Titulo)</h3> | |
<img src="~/Uploads/Imagens/teste.jpg" class="col-md-12 " style="padding:0;" /> | |
<div> | |
@Html.DisplayFor(model => item.Resumo); | |
</div> | |
</div> | |
</div> | |
</article> | |
</section> | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="row"> | |
@foreach(var item in Model) | |
{ | |
<div class="col-md-4"> | |
<div class="thumbnail"> | |
<h3 style="padding-left:17px;padding:0; background-color:orangered; margin:0; text-align:center;color:white;">@Html.DisplayFor(model => item.Titulo)</h3> | |
<img src="~/Uploads/Imagens/teste.jpg" class="col-md-12 " style="padding:0;" /> | |
<div> | |
@Html.DisplayFor(model => item.Resumo); | |
</div> | |
</div> | |
</div> | |
} | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment