Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- View:
- @model IEnumerable<Chat.Models.ChatLogs>
- @foreach(var prod in Model)
- {
- <tr>
- <td>@prod.ChatLogId</td>
- <td>@prod.Message</td>
- <td>@prod.UserId</td>
- </tr>
- }
- Controller:
- private ChatLogContext db = new ChatLogContext();
- public ActionResult Index()
- {
- IEnumerable<ChatLogs> c = from p in db.ChatLogs select p;
- return View(c);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement