Пример #1
0
        public bool RevokeToken(string userName)
        {
            var user = _context.Users.SingleOrDefault(u => u.UserName == userName);

            if (user is null)
            {
                return(false);
            }
            user.RefreshToken = null;
            _context.SaveChanges();
            return(true);
        }
 public T Create(T item)
 {
     try
     {
         dataset.Add(item);
         _context.SaveChanges();
         return(item);
     }
     catch (Exception)
     {
         throw;
     }
 }