Mineplex2018-withcommit/Website/LOC.Website.Web/Areas/Manage/Controllers/LogController.cs

58 lines
1.4 KiB
C#
Raw Normal View History

2013-08-27 17:14:08 +02:00
using System.Linq;
using System.Web.Mvc;
using LOC.Core;
using LOC.Website.Common.Contexts;
namespace LOC.Website.Web.Areas.Manage.Controllers
{
public class LogController : ManageControllerBase
{
private LocContext context = new LocContext();
//
// GET: /Log/
public ViewResult Index()
{
2014-01-21 02:48:14 +01:00
return View(/*context.LogEntries.ToList()*/);
2013-08-27 17:14:08 +02:00
}
//
// GET: /Log/Details/5
public ViewResult Details(int id)
{
2014-01-21 02:48:14 +01:00
//LogEntry logentry = context.LogEntries.Single(x => x.LogEntryId == id);
return View(/*logentry*/);
2013-08-27 17:14:08 +02:00
}
//
// GET: /Log/Delete/5
public ActionResult Delete(int id)
{
2014-01-21 02:48:14 +01:00
//LogEntry logentry = context.LogEntries.Single(x => x.LogEntryId == id);
return View();
2013-08-27 17:14:08 +02:00
}
//
// POST: /Log/Delete/5
[HttpPost, ActionName("Delete")]
public ActionResult DeleteConfirmed(int id)
{
2014-01-21 02:48:14 +01:00
//LogEntry logentry = context.LogEntries.Single(x => x.LogEntryId == id);
//context.LogEntries.Remove(logentry);
2013-08-27 17:14:08 +02:00
context.SaveChanges();
return RedirectToAction("Index");
}
protected override void Dispose(bool disposing)
{
if (disposing) {
context.Dispose();
}
base.Dispose(disposing);
}
}
}