Advertisement
Guest User

Untitled

a guest
Aug 4th, 2013
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.43 KB | None | 0 0
  1. View:
  2. @model IEnumerable<Chat.Models.ChatLogs>
  3.   @foreach(var prod in Model)
  4.   {
  5.     <tr>
  6.       <td>@prod.ChatLogId</td>
  7.       <td>@prod.Message</td>
  8.       <td>@prod.UserId</td>
  9.     </tr>
  10.   }
  11.  
  12. Controller:
  13.         private ChatLogContext db = new ChatLogContext();
  14.         public ActionResult Index()
  15.         {
  16.  
  17.             IEnumerable<ChatLogs> c = from p in db.ChatLogs select p;
  18.             return View(c);
  19.  
  20.  
  21.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement