Ejemplo n.º 1
0
        public ActionResult ReportUser(int id)
        {
            IRepository repository = new CommunicationWithDataBase();

            User user = repository.GetUserById(id);

            if (user == null)
            {
                logger.Error($"Пользователя с id {id} не сущестувует");
            }

            logger.Debug($"Обращение к базе данных, жалоба на пользователя");
            repository.ReportUser(id);
            logger.Debug($"Жалоба на пользователя была оставлена");

            return(View());
        }