db access tracking

This commit is contained in:
Paul Schneider 2017-02-23 03:10:30 +01:00
commit bfc50d262d
63 changed files with 177 additions and 187 deletions

View file

@ -1,4 +1,5 @@
using System.Linq;
using System.Security.Claims;
using Microsoft.AspNet.Http;
using Microsoft.AspNet.Mvc;
using Microsoft.Data.Entity;
@ -43,7 +44,7 @@ namespace Yavsc.Controllers
try
{
_context.SaveChanges();
_context.SaveChanges(User.GetUserId());
}
catch (DbUpdateConcurrencyException)
{
@ -72,7 +73,7 @@ namespace Yavsc.Controllers
_context.ClientProviderInfo.Add(clientProviderInfo);
try
{
_context.SaveChanges();
_context.SaveChanges(User.GetUserId());
}
catch (DbUpdateException)
{
@ -105,7 +106,7 @@ namespace Yavsc.Controllers
}
_context.ClientProviderInfo.Remove(clientProviderInfo);
_context.SaveChanges();
_context.SaveChanges(User.GetUserId());
return Ok(clientProviderInfo);
}