db access tracking
This commit is contained in:
parent
65eebf6409
commit
bfc50d262d
63 changed files with 177 additions and 187 deletions
|
|
@ -134,7 +134,7 @@ namespace Yavsc.Controllers
|
|||
if (ModelState.IsValid)
|
||||
{
|
||||
_context.Blogspot.Add(blog);
|
||||
_context.SaveChanges();
|
||||
_context.SaveChanges(User.GetUserId());
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
ModelState.AddModelError("Unknown","Invalid Blog posted ...");
|
||||
|
|
@ -188,7 +188,7 @@ namespace Yavsc.Controllers
|
|||
{
|
||||
// saves the change
|
||||
_context.Update(blog);
|
||||
_context.SaveChanges();
|
||||
_context.SaveChanges(User.GetUserId());
|
||||
ViewData["StatusMessage"] = "Post modified";
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
|
|
@ -231,7 +231,7 @@ namespace Yavsc.Controllers
|
|||
if (auth.Result)
|
||||
{
|
||||
_context.Blogspot.Remove(blog);
|
||||
_context.SaveChanges();
|
||||
_context.SaveChanges(User.GetUserId());
|
||||
}
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue