![]() |
cshtml'e veri aktarmak |
Post Reply ![]() |
|
Author | |
nkyek ![]() Newbie ![]() Joined: 06 Ocak 2008 Location: Turkey Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() Posted: 14 Ekim 2020 at 16:03 |
Forum da ve .net de yeni olmam hasebiyle, yanlışlarım için şimdiden özür dilerim asp.net,c#,mvc5, EF6, db first kullanarak bir uygulama üzerinde çalışıyorum sorunum şu; controller tarafında bir sql cümleciği dönüşünü cshtml içinde kullanmak istiyorum, cshtml içinde sorgu sonrası oluşan değişkenlere ulaşamıyorum; code --------- Conroller: OFISController.cs; public ActionResult Index2() { sql = "SELECT * FROM OFIS o " + "left join OFISFIRMABAGLA ofb on ofb.OFID = o.OFID " + "left join FIRMA f on f.FID = ofb.FID"; var qOFIS = db.Database.SqlQuery<DbSet>(sql); if (qOFIS == null) HttpNotFound(); return View(qOFIS.ToList()); } View: Index2.cshml; @model IEnumerable<ildemavm3.Controllers.OFISsController> <td>@Html.DisplayFor(modelItem => item.?????? )</td> Edited by nkyek - 14 Ekim 2020 at 16:08 |
|
![]() |
Post Reply ![]() |
|
Tweet
|
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |