예제 #1
0
 public static void MarkLog(string email)
 {
     using (var db = new ApplicationDbContext())
     {
         var log = new UserLogs
         {
             UserId   = db.Users.Where(u => u.Email.Equals(email)).Select(i => i.Id).First(),
             LoggedAt = DateTime.Now
         };
         db.UserLogs.Add(log);
         db.SaveChanges();
     }
 }
예제 #2
0
 public static void MarkLog(string email)
 {
     using (var db = new ApplicationDbContext())
     {
         var log = new UserLogs
         {
             UserId = db.Users.Where(u => u.Email.Equals(email)).Select(i => i.Id).First(),
             LoggedAt = DateTime.Now
         };
         db.UserLogs.Add(log);
         db.SaveChanges();
     }
 }