Пример #1
0
        public void UpdateUser(Users user)
        {
            foreach (UserRole r in userContext.UserRoles.Where(u => u.UserID == user.UserID).ToList())
              userContext.UserRoles.Remove(r);

            foreach (UserRole userRole in user.UserRoles)
                userContext.UserRoles.Add(userRole);
            userContext.Entry(user).State = EntityState.Modified;
            userContext.SaveChanges();
        }
Пример #2
0
 public void CreateModificationDetails(Users user)
 {
     user.ModificationType = "Created";
     ModificationDetails(user);
 }
Пример #3
0
 public void CreateNewUser(Users user)
 {
     userContext.UserProfiles.Add(user);
     userContext.SaveChanges();
 }
Пример #4
0
 public void ModificationDetails(Users user)
 {
     user.ModifiedDate = DateTime.Now;
     user.ModifiedBy = Convert.ToString(Session["UserID"]);
 }