Beispiel #1
0
 public void Insert(int userId, string Link)
 {
     try
     {
         var vList = new User_PasswordReset
         {
             User_Id = userId,
             PasswordReset_ExpiryDate = DateTime.Now.AddDays(PasswordExpiryDays),
             PasswordReset_Link       = Link,
             PasswordReset_Status     = "Active",
             AddedBy = userId,
             AddedOn = DateTime.Now
         };
         adbContext.user_passwordreset.Add(vList);
         adbContext.SaveChanges();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Beispiel #2
0
        public void Insert(int userId, string Link, string token_No)
        {
            try
            {
                Delete(userId);

                var vList = new User_PasswordReset
                {
                    User_Id = userId,
                    PasswordReset_ExpiryDate = DateTime.Now.AddMinutes(30),
                    PasswordReset_Link       = Link,
                    PasswordReset_Status     = "Active",
                    Token_No = token_No,
                    AddedBy  = userId,
                    AddedOn  = DateTime.Now
                };
                adbContext.user_passwordreset.Add(vList);
                adbContext.SaveChanges();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }