Beispiel #1
0
 private bool InsertUserQuestionInDatabase()
 {
     try
     {
         var userQuestions = HttpContext.Session.GetObject <List <UserQuestion> >(Sessions.CurrentUserQuestions);
         if (userQuestions == null)
         {
             return(false);
         }
         _intellectDbContext.UserQuestions.AddRange(userQuestions);
         _intellectDbContext.SaveChanges();
     }
     catch
     {
         return(false);
     }
     return(true);
 }
 public void DeleteAsync(TEntity entity)
 {
     _context.Set <TEntity>().Update(entity);
     _context.SaveChanges();
 }
 public int Complete()
 {
     return(_dbContext.SaveChanges());
 }