/// <summary>
 /// Salva uma mensagem na base de dados
 /// </summary>
 /// <param name="newEntity"></param>
 /// <returns></returns>
 public VideoQuestionAnsweredEntity CreateVideoQuestionAnswered(VideoQuestionAnsweredEntity newEntity)
 {
     using (ModelContext context = new ModelContext())
     {
         newEntity.AnsweredDate = DateTime.UtcNow;
         context.VideoQuestionAnswereds.Attach(newEntity);
         context.Entry(newEntity).State = System.Data.Entity.EntityState.Added;
         context.SaveChanges();
     }
     return(newEntity);
 }
        /// <summary>
        /// Atualiza uma mensagem
        /// </summary>
        /// <param name="updatedEntity"></param>
        /// <returns></returns>
        public VideoQuestionAnsweredEntity UpdateVideoQuestionAnswered(VideoQuestionAnsweredEntity updatedEntity)
        {
            using (ModelContext context = new ModelContext())
            {
                updatedEntity.AnsweredDate = DateTime.UtcNow;
                context.VideoQuestionAnswereds.Attach(updatedEntity);
                context.Entry(updatedEntity).State = System.Data.Entity.EntityState.Modified;
                context.SaveChanges();
            }

            return(updatedEntity);
        }