db access tracking
This commit is contained in:
parent
65eebf6409
commit
bfc50d262d
63 changed files with 177 additions and 187 deletions
|
|
@ -1,5 +1,6 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security.Claims;
|
||||
using Microsoft.AspNet.Authorization;
|
||||
using Microsoft.AspNet.Http;
|
||||
using Microsoft.AspNet.Mvc;
|
||||
|
|
@ -63,7 +64,7 @@ namespace Yavsc.Controllers
|
|||
|
||||
try
|
||||
{
|
||||
_context.SaveChanges();
|
||||
_context.SaveChanges(User.GetUserId());
|
||||
}
|
||||
catch (DbUpdateConcurrencyException)
|
||||
{
|
||||
|
|
@ -92,7 +93,7 @@ namespace Yavsc.Controllers
|
|||
_context.Users.Add(applicationUser);
|
||||
try
|
||||
{
|
||||
_context.SaveChanges();
|
||||
_context.SaveChanges(User.GetUserId());
|
||||
}
|
||||
catch (DbUpdateException)
|
||||
{
|
||||
|
|
@ -125,7 +126,7 @@ namespace Yavsc.Controllers
|
|||
}
|
||||
|
||||
_context.Users.Remove(applicationUser);
|
||||
_context.SaveChanges();
|
||||
_context.SaveChanges(User.GetUserId());
|
||||
|
||||
return Ok(applicationUser);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue