Exemplo n.º 1
0
        public List <Alert> GetAlerts(int userID)
        {
            List <Alert> alerts = AlertRepository.GetItems(x => x.UserID == userID && !x.Delivered);

            foreach (var alert in alerts)
            {
                alert.Delivered = true;
            }
            AlertRepository.SaveChanges();
            return(alerts);
        }