Exemplo n.º 1
0
        public void SaveQuestion(Question Question)
        {
            try
            {
                if (Question.Id == 0)
                {
                    _RQuestion.Add(Question);
                }
                else
                {
                    _uow.Entry(Question).State = EntityState.Modified;

                }
                _uow.SaveChanges();
            }
            catch (Exception ex)
            {

            }
        }
Exemplo n.º 2
0
 public void DeleteQuestion(Question Question)
 {
     _RQuestion.Remove(Question);
     _uow.SaveChanges();
 }